refetch widgets with apps too
This commit is contained in:
parent
ed9fc728ee
commit
9c1458d89b
|
@ -158,6 +158,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
private fun refetchLaunchers() {
|
private fun refetchLaunchers() {
|
||||||
val launchers = getAllAppLaunchers()
|
val launchers = getAllAppLaunchers()
|
||||||
(all_apps_fragment as AllAppsFragment).gotLaunchers(launchers)
|
(all_apps_fragment as AllAppsFragment).gotLaunchers(launchers)
|
||||||
|
(widgets_fragment as WidgetsFragment).getAppWidgets()
|
||||||
|
|
||||||
mCachedLaunchers.map { it.packageName }.forEach { packageName ->
|
mCachedLaunchers.map { it.packageName }.forEach { packageName ->
|
||||||
if (!launchers.map { it.packageName }.contains(packageName)) {
|
if (!launchers.map { it.packageName }.contains(packageName)) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
|
||||||
setupAdapter(appWidgets)
|
setupAdapter(appWidgets)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getAppWidgets() {
|
fun getAppWidgets() {
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
// get the casual widgets
|
// get the casual widgets
|
||||||
var appWidgets = ArrayList<AppWidget>()
|
var appWidgets = ArrayList<AppWidget>()
|
||||||
|
|
Loading…
Reference in New Issue