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.
This commit is contained in:
ByteHamster 2020-06-14 18:59:42 +02:00
parent f48c75aa83
commit d322cc1e8e
1 changed files with 2 additions and 3 deletions

View File

@ -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));
}
}