Simplification

pull/214/head
M66B 11 months ago
parent 5ba112871d
commit 21515ca91d

@ -741,11 +741,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
Intent intent = getIntent();
boolean search = (intent != null && intent.hasExtra(Intent.EXTRA_PROCESS_TEXT));
boolean standalone = (intent != null && intent.getBooleanExtra("standalone", false));
boolean unified = (intent != null &&
("unified".equals(intent.getAction()) ||
("folder:-1".equals(intent.getAction()) &&
intent.getLongExtra("account", 0) < 0 &&
intent.getStringExtra("type") == null)));
boolean unified = (intent != null && "unified".equals(intent.getAction()));
if (!search && !(standalone && !unified))
init();
}

@ -70,9 +70,13 @@ public class WidgetUnified extends AppWidgetProvider {
padding = 2; // Default medium
Intent view = new Intent(context, ActivityView.class);
if (account < 0 && folder < 0 && type == null)
view.setAction("unified");
else {
view.setAction("folder:" + folder);
view.putExtra("account", account);
view.putExtra("type", type);
}
view.putExtra("standalone", standalone);
view.putExtra("refresh", true);
view.putExtra("version", version);

Loading…
Cancel
Save