diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2022-05-24 19:47:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-24 19:47:22 +0200 |
commit | b1668a156af377449e039d807a0fe6ed3d91c5d6 (patch) | |
tree | 3015cce181889ce4b9912a5b68bee92f4a1d37ea /app | |
parent | 8870463ec4413d8a38cd4047b447edc3b311e11b (diff) | |
parent | 48963616a688d97191f14df389d0aeb957d6388e (diff) | |
download | AntennaPod-b1668a156af377449e039d807a0fe6ed3d91c5d6.zip |
Merge pull request #5910 from ByteHamster/dont-recreate
Don't recreate activity when a result is pending
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index f666951f0..19b08fc02 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -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 |