Remove MainActivity.recreate

pull/848/head
Alex Baker 5 years ago
parent 9b9c8c95a9
commit cd5cd6fe66

@ -305,7 +305,7 @@ public class MainActivity extends InjectingAppCompatActivity
if (currentNightMode != getNightMode()) {
tracker.reportEvent(Tracking.Events.NIGHT_MODE_MISMATCH);
restart();
recreate();
return;
}
@ -325,10 +325,6 @@ public class MainActivity extends InjectingAppCompatActivity
handleIntent();
}
public void restart() {
recreate();
}
private int getNightMode() {
return getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
}

@ -84,12 +84,12 @@ public class NavigationDrawerFragment extends InjectingFragment {
if (requestCode == NavigationDrawerAdapter.REQUEST_SETTINGS) {
if (resultCode == Activity.RESULT_OK && data != null) {
if (data.getBooleanExtra(AppearancePreferences.EXTRA_RESTART, false)) {
((MainActivity) getActivity()).restart();
getActivity().recreate();
}
}
} else if (requestCode == NavigationDrawerAdapter.REQUEST_PURCHASE) {
if (resultCode == Activity.RESULT_OK) {
((MainActivity) getActivity()).restart();
getActivity().recreate();
}
} else if (requestCode == REQUEST_NEW_LIST
|| requestCode == ACTIVITY_REQUEST_NEW_FILTER

Loading…
Cancel
Save