From daf3e089953435a93c7e19534c469b3a5bc3e138 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 22 Dec 2023 11:00:12 +0100 Subject: [PATCH] Fix issue #996 - Crashes with profiles --- .../android/mastodon/activities/ContextActivity.java | 6 ++++++ .../android/mastodon/activities/ProfileActivity.java | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/ContextActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ContextActivity.java index 7d9390c7..a166587f 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/ContextActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ContextActivity.java @@ -113,6 +113,12 @@ public class ContextActivity extends BaseActivity implements FragmentMastodonCon } } + @Override + protected void onSaveInstanceState(@NonNull Bundle outState) { + super.onSaveInstanceState(outState); + outState.clear(); + } + private void loadLocalConversation() { Bundle bundle = new Bundle(); bundle.putSerializable(Helper.ARG_STATUS, focusedStatus); diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java index 79f64b71..336f47c5 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/ProfileActivity.java @@ -234,6 +234,12 @@ public class ProfileActivity extends BaseActivity { } } + @Override + protected void onSaveInstanceState(@NonNull Bundle outState) { + super.onSaveInstanceState(outState); + outState.clear(); + } + private void initializeView(Account account) { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(ProfileActivity.this); if (account == null) {