Merge pull request #5910 from ByteHamster/dont-recreate
Don't recreate activity when a result is pending
This commit is contained in:
commit
b1668a156a
|
@ -409,11 +409,6 @@ public class MainActivity extends CastEnabledActivity {
|
|||
super.onStart();
|
||||
EventBus.getDefault().register(this);
|
||||
RatingDialog.init(this);
|
||||
|
||||
if (lastTheme != UserPreferences.getNoTitleTheme()) {
|
||||
finish();
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -422,6 +417,17 @@ public class MainActivity extends CastEnabledActivity {
|
|||
StorageUtils.checkStorageAvailability(this);
|
||||
handleNavIntent();
|
||||
RatingDialog.check();
|
||||
|
||||
if (lastTheme != UserPreferences.getNoTitleTheme()) {
|
||||
finish();
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
lastTheme = UserPreferences.getNoTitleTheme(); // Don't recreate activity when a result is pending
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue