Merge pull request #82 from esensar/fix/hidden-apps-crash

Fix crash when removing last hidden icon from HiddenIconsActivity
This commit is contained in:
Tibor Kaputa 2023-07-17 17:03:30 +02:00 committed by GitHub
commit 6f1ce87af0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,11 @@ class HiddenIconsActivity : SimpleActivity(), RefreshRecyclerViewListener {
})
).toMutableList() as ArrayList<HiddenIcon>
manage_hidden_icons_placeholder.beVisibleIf(hiddenIcons.isEmpty())
val hiddenIconsEmpty = hiddenIcons.isEmpty()
runOnUiThread {
manage_hidden_icons_placeholder.beVisibleIf(hiddenIconsEmpty)
}
if (hiddenIcons.isNotEmpty()) {
val intent = Intent(Intent.ACTION_MAIN, null)
intent.addCategory(Intent.CATEGORY_LAUNCHER)