Added widget folder type

pull/168/head
M66B 5 years ago
parent b5f517b91c
commit 77fc85faed

@ -96,6 +96,7 @@ public class ActivityWidgetUnified extends ActivityBase {
editor.remove("widget." + appWidgetId + ".name");
editor.putLong("widget." + appWidgetId + ".account", account == null ? -1L : account.id);
editor.putLong("widget." + appWidgetId + ".folder", folder == null ? -1L : folder.id);
editor.putString("widget." + appWidgetId + ".type", folder == null ? null : folder.type);
editor.putBoolean("widget." + appWidgetId + ".unseen", cbUnseen.isChecked());
editor.putBoolean("widget." + appWidgetId + ".flagged", cbFlagged.isChecked());
editor.apply();

@ -71,10 +71,12 @@ public class WidgetUnified extends AppWidgetProvider {
for (int appWidgetId : appWidgetIds) {
long account = prefs.getLong("widget." + appWidgetId + ".account", -1L);
long folder = prefs.getLong("widget." + appWidgetId + ".folder", -1L);
String type = prefs.getString("widget." + appWidgetId + ".type", null);
Intent view = new Intent(context, ActivityView.class);
view.setAction("folder:" + folder);
view.putExtra("account", account);
view.putExtra("type", type);
view.putExtra("refresh", true);
view.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent pi = PendingIntent.getActivity(context, ActivityView.REQUEST_FOLDER, view, PendingIntent.FLAG_UPDATE_CURRENT);

Loading…
Cancel
Save