diff --git a/app/src/main/java/com/topjohnwu/magisk/MainActivity.java b/app/src/main/java/com/topjohnwu/magisk/MainActivity.java index e14caaedb..69191a45a 100644 --- a/app/src/main/java/com/topjohnwu/magisk/MainActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/MainActivity.java @@ -135,20 +135,25 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On mSelectedId = savedInstanceState == null ? mSelectedId : savedInstanceState.getInt(SELECTED_ITEM_ID); navigationView.setCheckedItem(mSelectedId); - if (savedInstanceState == null) { - mDrawerHandler.removeCallbacksAndMessages(null); - mDrawerHandler.postDelayed(() -> navigate(mSelectedId), 250); - } navigationView.setNavigationItemSelectedListener(this); Bundle extras = getIntent().getExtras(); if (extras != null) { - navigate(R.id.settings); - Logger.dh("MainActivity: Intent has extras " + getIntent().getExtras().getString("Relaunch")); + String toLaunch = ""; + toLaunch = getIntent().getExtras().getString("Relaunch"); + if (toLaunch.equals("Settings")) { + Logger.dh("MainActivity: Intent has extras " + getIntent().getExtras().getString("Relaunch")); + mSelectedId = R.id.settings; + } } + + mDrawerHandler.removeCallbacksAndMessages(null); + navigate(mSelectedId); + + } @Override diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index ca2ed3910..4bab5f5eb 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -16,7 +16,7 @@ #3F51B5 #303F9F #C5CAE9 - #9C6DFF + #448AFF #dedede #8A8A8A @@ -24,8 +24,8 @@ #313131 #FF9800 @color/dh_accent - #2196F3 - #FF5722 + @color/dh_primary_light + @color/red500