Re-added Cancel button in Hidden App Fragment confirmation dialog and fixed renaming in search.

This commit is contained in:
ottoptj 2024-08-06 01:29:09 +03:00
commit 48b0bccbee
3 changed files with 9 additions and 2 deletions

View file

@ -106,7 +106,7 @@ class AppActionMenu {
editText.text.toString() editText.text.toString()
) )
CoroutineScope(Dispatchers.Default).launch { CoroutineScope(Dispatchers.Default).launch {
activity.refreshAppMenu() activity.applySearch()
} }
@ -127,7 +127,7 @@ class AppActionMenu {
CoroutineScope(Dispatchers.Default).launch { CoroutineScope(Dispatchers.Default).launch {
CoroutineScope(Dispatchers.Default).launch { CoroutineScope(Dispatchers.Default).launch {
activity.refreshAppMenu() activity.applySearch()
} }
} }
} }

View file

@ -105,6 +105,9 @@ class HiddenAppsFragment : Fragment(), HiddenAppsAdapter.OnItemClickListener {
// Perform action on confirmation // Perform action on confirmation
performConfirmedAction(appInfo, appName, profile) performConfirmedAction(appInfo, appName, profile)
} }
setNegativeButton("Cancel") { _, _ ->
}
}.create().show() }.create().show()
} }

View file

@ -550,6 +550,10 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
}) })
} }
suspend fun applySearch() {
filterItems(searchView.text.toString())
}
private suspend fun filterItems(query: String?) { private suspend fun filterItems(query: String?) {
val cleanQuery = stringUtils.cleanString(query) val cleanQuery = stringUtils.cleanString(query)