Simplification

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

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

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

Loading…
Cancel
Save