From d57989c67a1c003a258d665a23ae911e4e441a0c Mon Sep 17 00:00:00 2001 From: TheScarastic Date: Tue, 20 Feb 2024 19:10:17 +0530 Subject: [PATCH] fix(widget): Fix unrepsonsive widgets at time --- bliss/src/foundation/e/bliss/widgets/WidgetContainer.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bliss/src/foundation/e/bliss/widgets/WidgetContainer.kt b/bliss/src/foundation/e/bliss/widgets/WidgetContainer.kt index 4555d8ea18a..c88016137bf 100644 --- a/bliss/src/foundation/e/bliss/widgets/WidgetContainer.kt +++ b/bliss/src/foundation/e/bliss/widgets/WidgetContainer.kt @@ -237,6 +237,7 @@ class WidgetContainer(context: Context, attrs: AttributeSet?) : Logger.e(TAG, "Could not add widget ${it.flattenToString()}") } } + rebindWidgets() } else { rebindWidgets(true) } @@ -285,6 +286,7 @@ class WidgetContainer(context: Context, attrs: AttributeSet?) : if (!isWidgetBound) { mWidgetHost.deleteAppWidgetId(widgetId) Logger.e(TAG, "Could not add widget ${provider.flattenToString()}") + return } configureWidget(widgetId) @@ -293,8 +295,7 @@ class WidgetContainer(context: Context, attrs: AttributeSet?) : private fun configureWidget(widgetId: Int) { val info = mWidgetManager.getAppWidgetInfo(widgetId) if (info != null) { - val widgetInfo = LauncherAppWidgetProviderInfo.fromProviderInfo(launcher, info) - if (widgetInfo.configure != null) { + if (info.configure != null) { sendIntent(widgetId) } else { addView(widgetId) -- GitLab