Merge pull request #5910 from ByteHamster/dont-recreate

Don't recreate activity when a result is pending
This commit is contained in:
ByteHamster 2022-05-24 19:47:22 +02:00 committed by GitHub
commit b1668a156a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 5 deletions

View File

@ -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