mirror of https://github.com/M66B/FairEmail.git
Simplification
This commit is contained in:
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);
|
||||||
view.setAction("folder:" + folder);
|
if (account < 0 && folder < 0 && type == null)
|
||||||
view.putExtra("account", account);
|
view.setAction("unified");
|
||||||
view.putExtra("type", type);
|
else {
|
||||||
|
view.setAction("folder:" + folder);
|
||||||
|
view.putExtra("account", account);
|
||||||
|
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…
Reference in New Issue