mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Fix history showing up when clearing search query
This commit is contained in:
parent
793ad8e731
commit
5992b0c567
@ -41,6 +41,7 @@ import java.io.File
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.SocketTimeoutException
|
||||
import java.net.URL
|
||||
import java.util.concurrent.Executors
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
@ -54,7 +55,6 @@ import okio.BufferedSink
|
||||
import okio.buffer
|
||||
import okio.sink
|
||||
import okio.source
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
/**
|
||||
* Download service with custom implementation of downloading using [HttpURLConnection].
|
||||
|
@ -268,7 +268,6 @@ class MainActivity : BaseActivity() {
|
||||
searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
|
||||
override fun onQueryTextSubmit(query: String?): Boolean {
|
||||
navController.navigate(R.id.searchResultFragment, bundleOf("query" to query))
|
||||
searchViewModel.setQuery("")
|
||||
searchView.clearFocus()
|
||||
return true
|
||||
}
|
||||
@ -318,10 +317,8 @@ class MainActivity : BaseActivity() {
|
||||
|
||||
override fun onMenuItemActionCollapse(item: MenuItem): Boolean {
|
||||
if (binding.mainMotionLayout.progress == 0F) {
|
||||
try {
|
||||
runCatching {
|
||||
minimizePlayer()
|
||||
} catch (e: Exception) {
|
||||
// current fragment isn't the player fragment
|
||||
}
|
||||
}
|
||||
// Handover back press to `BackPressedDispatcher`
|
||||
|
Loading…
Reference in New Issue
Block a user