Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbe9f6cd authored by Moez Bhatti's avatar Moez Bhatti
Browse files

Fixed crash when viewing sub-settings page

parent aca7fefc
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -310,7 +310,8 @@ public class MainActivity extends QKActivity implements SlidingMenu.SlidingMenuL
            if (!mSlidingMenu.isMenuShowing()) {
            if (!mSlidingMenu.isMenuShowing()) {
                Fragment category = getFragmentManager().findFragmentByTag(SettingsFragment.CATEGORY_TAG);
                Fragment category = getFragmentManager().findFragmentByTag(SettingsFragment.CATEGORY_TAG);
                if (category != null) {
                if (category != null) {
                    getFragmentManager().beginTransaction().remove(category).commit();
                    getFragmentManager().beginTransaction()
                            .replace(R.id.content_frame, SettingsFragment.newInstance(R.xml.settings_main)).commit();
                } else {
                } else {
                    mSlidingMenu.showMenu();
                    mSlidingMenu.showMenu();
                }
                }
+1 −1
Original line number Original line Diff line number Diff line
@@ -520,7 +520,7 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
            Fragment fragment = SettingsFragment.newInstance(resId);
            Fragment fragment = SettingsFragment.newInstance(resId);
            getFragmentManager()
            getFragmentManager()
                    .beginTransaction()
                    .beginTransaction()
                    .add(R.id.content_frame, fragment, CATEGORY_TAG)
                    .replace(R.id.content_frame, fragment, CATEGORY_TAG)
                    .commit();
                    .commit();
        }
        }