Fixed unified widget message intent

This commit is contained in:
M66B 2022-07-10 22:21:25 +02:00
parent f7682d4387
commit 46847f7155
2 changed files with 3 additions and 3 deletions

View File

@ -1427,7 +1427,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
Intent intent = getIntent();
String action = (intent == null ? null : intent.getAction());
if (action != null &&
(action.startsWith("thread") || action.equals("widget")))
(action.startsWith("thread") || action.startsWith("widget")))
return;
String last = prefs.getString("changelog", null);
@ -1753,7 +1753,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
intent.putExtra("id", id);
onViewThread(intent);
} else if (action.equals("widget")) {
} else if (action.startsWith("widget")) {
long account = intent.getLongExtra("widget_account", -1);
long folder = intent.getLongExtra("widget_folder", -1);
String type = intent.getStringExtra("widget_type");

View File

@ -121,7 +121,7 @@ public class WidgetUnified extends AppWidgetProvider {
views.setRemoteAdapter(R.id.lv, service);
Intent thread = new Intent(context, ActivityView.class);
thread.setAction("widget");
thread.setAction("widget:" + appWidgetId);
thread.putExtra("widget_account", account);
thread.putExtra("widget_folder", folder);
thread.putExtra("widget_type", type);