mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-01-27 06:05:00 +01:00
always redraw icons after fetching just to avoid some glitches
This commit is contained in:
parent
13b3e11c5c
commit
cc38bb4af4
@ -70,7 +70,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||
ensureBackgroundThread {
|
||||
getDefaultAppPackages()
|
||||
config.wasHomeScreenInit = true
|
||||
home_screen_grid.fetchAppIcons(true)
|
||||
home_screen_grid.fetchAppIcons()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<HomeScreenGridItem>
|
||||
appIcons.forEach { item ->
|
||||
@ -51,9 +51,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
|
||||
}
|
||||
}
|
||||
|
||||
if (forceRedraw) {
|
||||
invalidate()
|
||||
}
|
||||
invalidate()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user