diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt index ff24800..f663078 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt @@ -70,7 +70,7 @@ class MainActivity : SimpleActivity(), FlingListener { ensureBackgroundThread { getDefaultAppPackages() config.wasHomeScreenInit = true - home_screen_grid.fetchAppIcons(true) + home_screen_grid.fetchAppIcons() } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt index 83a7181..37ca261 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt @@ -38,10 +38,10 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie textSize = context.resources.getDimension(R.dimen.normal_text_size) } - fetchAppIcons(false) + fetchAppIcons() } - fun fetchAppIcons(forceRedraw: Boolean) { + fun fetchAppIcons() { ensureBackgroundThread { appIcons = context.homeScreenGridItemsDB.getAllItems() as ArrayList appIcons.forEach { item -> @@ -51,9 +51,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie } } - if (forceRedraw) { - invalidate() - } + invalidate() } }