summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2020-06-14 18:59:42 +0200
committerByteHamster <info@bytehamster.com>2020-06-14 18:59:45 +0200
commitd322cc1e8e2bc81054cc69963dabf2d5253d3530 (patch)
treeb88f2fd928ebcd565ba0b79b0dca4b82392da6f5 /app
parentf48c75aa8344dd6ac8c4043c8f11097ae23c69d4 (diff)
downloadAntennaPod-d322cc1e8e2bc81054cc69963dabf2d5253d3530.zip
Fixed crash when changing theme
Apparently, recreate() brings RxJava in a strange state where errors are directly thrown instead of relaying them to the error callback. Because of a race condition in ItemDescriptionFragment.loadData, this throws a NPE.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java5
1 files changed, 2 insertions, 3 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 e05538b63..eaa423708 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java
@@ -317,9 +317,8 @@ public class MainActivity extends CastEnabledActivity {
RatingDialog.init(this);
if (lastTheme != UserPreferences.getNoTitleTheme()) {
- // Nav drawer is empty for half a second after recreating. Don't confuse users with that.
- drawerLayout.closeDrawer(navDrawer);
- recreate();
+ finish();
+ startActivity(new Intent(this, MainActivity.class));
}
}