refetch widgets with apps too

This commit is contained in:
tibbi 2022-09-19 18:47:08 +02:00
parent ed9fc728ee
commit 9c1458d89b
2 changed files with 2 additions and 1 deletions

View File

@ -158,6 +158,7 @@ class MainActivity : SimpleActivity(), FlingListener {
private fun refetchLaunchers() {
val launchers = getAllAppLaunchers()
(all_apps_fragment as AllAppsFragment).gotLaunchers(launchers)
(widgets_fragment as WidgetsFragment).getAppWidgets()
mCachedLaunchers.map { it.packageName }.forEach { packageName ->
if (!launchers.map { it.packageName }.contains(packageName)) {

View File

@ -36,7 +36,7 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
setupAdapter(appWidgets)
}
private fun getAppWidgets() {
fun getAppWidgets() {
ensureBackgroundThread {
// get the casual widgets
var appWidgets = ArrayList<AppWidget>()