Restart visible activity only

pull/198/head
M66B 4 years ago
parent 88d1d4cb09
commit 7e77993706

@ -572,7 +572,9 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
Log.i("Preference " + key + "=" + prefs.getAll().get(key)); Log.i("Preference " + key + "=" + prefs.getAll().get(key));
if ("theme".equals(key) || "beige".equals(key)) { if ("theme".equals(key) || "beige".equals(key)) {
finish(); finish();
if (this.getClass().equals(ActivitySetup.class) || this.getClass().equals(ActivityView.class)) if (visible &&
(this.getClass().equals(ActivitySetup.class) ||
this.getClass().equals(ActivityView.class)))
startActivity(getIntent()); startActivity(getIntent());
} else if (!this.getClass().equals(ActivitySetup.class) && !visible && } else if (!this.getClass().equals(ActivitySetup.class) && !visible &&
Arrays.asList(FragmentOptions.OPTIONS_RESTART).contains(key)) Arrays.asList(FragmentOptions.OPTIONS_RESTART).contains(key))

Loading…
Cancel
Save