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