Revert "work around crash theme switch"

This reverts commit 58fd0c444f30aa5352486b97cab34b2aca6ce8ab.
This commit is contained in:
sk 2023-01-13 14:18:39 -03:00 committed by LucasGGamerM
parent f4356e74a4
commit 130085f804
2 changed files with 4 additions and 15 deletions

View File

@ -5,10 +5,6 @@ import android.app.NotificationManager;
import android.graphics.Outline;
import android.os.Build;
import android.os.Bundle;
import android.service.notification.StatusBarNotification;
import android.util.Log;
import android.service.notification.StatusBarNotification;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -323,16 +319,10 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
super.onSaveInstanceState(outState);
outState.putInt("selectedTab", currentTab);
try {
getChildFragmentManager().putFragment(outState, "homeTabFragment", homeTabFragment);
getChildFragmentManager().putFragment(outState, "searchFragment", searchFragment);
getChildFragmentManager().putFragment(outState, "notificationsFragment", notificationsFragment);
getChildFragmentManager().putFragment(outState, "profileFragment", profileFragment);
} catch (IllegalStateException ex) {
// java.lang.IllegalStateException: Fragment HomeTabFragment{3447cad} is not currently in the FragmentManager
// no idea how to fix this :/
Log.e(HomeFragment.class.getSimpleName(), ex.getMessage());
}
getChildFragmentManager().putFragment(outState, "homeTabFragment", homeTabFragment);
getChildFragmentManager().putFragment(outState, "searchFragment", searchFragment);
getChildFragmentManager().putFragment(outState, "notificationsFragment", notificationsFragment);
getChildFragmentManager().putFragment(outState, "profileFragment", profileFragment);
// getChildFragmentManager().putFragment(outState, "homeTimelineFragment", homeTimelineFragment);
// getChildFragmentManager().putFragment(outState, "searchFragment", searchFragment);

View File

@ -435,7 +435,6 @@ public class SettingsFragment extends MastodonToolbarFragment{
lp.windowAnimations=R.style.window_fade_out;
MastodonApp.context.getSystemService(WindowManager.class).addView(themeTransitionWindowView, lp);
}
needAppRestart = true; // avoid issues with corrupted, not correctly inset HomeTabFragment
getActivity().recreate();
}