mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-01-27 06:05:00 +01:00
refresh the home screen once initial apps have been stored
This commit is contained in:
parent
e9c248b520
commit
13b3e11c5c
@ -70,6 +70,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||
ensureBackgroundThread {
|
||||
getDefaultAppPackages()
|
||||
config.wasHomeScreenInit = true
|
||||
home_screen_grid.fetchAppIcons(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,10 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
|
||||
textSize = context.resources.getDimension(R.dimen.normal_text_size)
|
||||
}
|
||||
|
||||
fetchAppIcons(false)
|
||||
}
|
||||
|
||||
fun fetchAppIcons(forceRedraw: Boolean) {
|
||||
ensureBackgroundThread {
|
||||
appIcons = context.homeScreenGridItemsDB.getAllItems() as ArrayList<HomeScreenGridItem>
|
||||
appIcons.forEach { item ->
|
||||
@ -46,6 +50,10 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
|
||||
appIconDrawables[item.packageName] = drawable
|
||||
}
|
||||
}
|
||||
|
||||
if (forceRedraw) {
|
||||
invalidate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user