mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 18:19:16 +01:00
search query preference and BackHandler fix
This commit is contained in:
parent
a0625e5de2
commit
a6f35dda4d
@ -216,9 +216,11 @@ private fun DownloadStatsAppBar(
|
|||||||
},
|
},
|
||||||
scrollBehavior = scrollBehavior,
|
scrollBehavior = scrollBehavior,
|
||||||
)
|
)
|
||||||
BackHandler(
|
if (searchQuery != null) {
|
||||||
onBack = { onChangeSearchQuery(null) },
|
BackHandler(
|
||||||
)
|
onBack = { onChangeSearchQuery(null) },
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,6 +298,8 @@ class DownloadStatsScreenModel(
|
|||||||
mutableState.update { it.copy(searchQuery = query) }
|
mutableState.update { it.copy(searchQuery = query) }
|
||||||
if (query != null) {
|
if (query != null) {
|
||||||
preferenceStore.getString("search_query", "").set(query)
|
preferenceStore.getString("search_query", "").set(query)
|
||||||
|
} else {
|
||||||
|
preferenceStore.getString("search_query", "").delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user