mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
fix: show search history when clearing query
This commit is contained in:
parent
f938a7dfc5
commit
c253a4e415
@ -335,7 +335,7 @@ class MainActivity : BaseActivity() {
|
||||
R.id.channelFragment,
|
||||
R.id.playlistFragment
|
||||
)
|
||||
if (navController.currentDestination?.id in destIds && newText.isNullOrEmpty()) {
|
||||
if (navController.currentDestination?.id in destIds && newText == null) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -33,11 +33,9 @@ class SearchFragment : Fragment() {
|
||||
private val binding get() = _binding!!
|
||||
private val viewModel: SearchViewModel by activityViewModels()
|
||||
|
||||
private var query: String? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
query = arguments?.getString(IntentData.query)
|
||||
viewModel.searchQuery.value = arguments?.getString(IntentData.query)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
|
Loading…
x
Reference in New Issue
Block a user