diff options
author | Taco <SkytkRSfan3895@gmail.com> | 2022-09-09 05:40:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 05:40:07 +0000 |
commit | e04fedfc64cbe570a2934e05c1e8e4da7b6ddb28 (patch) | |
tree | 1fdcc408f355f5223ab1798c1a0cd7b00a9d3a94 /app/src/main | |
parent | b72bfdef371a616736f35e39982d386254009a8e (diff) | |
download | infinity-for-reddit-e04fedfc64cbe570a2934e05c1e8e4da7b6ddb28.tar infinity-for-reddit-e04fedfc64cbe570a2934e05c1e8e4da7b6ddb28.tar.gz infinity-for-reddit-e04fedfc64cbe570a2934e05c1e8e4da7b6ddb28.tar.bz2 infinity-for-reddit-e04fedfc64cbe570a2934e05c1e8e4da7b6ddb28.tar.lz infinity-for-reddit-e04fedfc64cbe570a2934e05c1e8e4da7b6ddb28.tar.xz infinity-for-reddit-e04fedfc64cbe570a2934e05c1e8e4da7b6ddb28.tar.zst infinity-for-reddit-e04fedfc64cbe570a2934e05c1e8e4da7b6ddb28.zip |
Use simpler DrawerLayout methods (#1015)
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java index 5b87ec69..5eff56e8 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java @@ -1097,8 +1097,8 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb @Override public void onBackPressed() {; - if (drawer.isDrawerOpen(GravityCompat.START)) { - drawer.closeDrawer(GravityCompat.START); + if (drawer.isOpen()) { + drawer.close(); } else { if (mBackButtonAction == SharedPreferencesUtils.MAIN_PAGE_BACK_BUTTON_ACTION_CONFIRM_EXIT) { new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme) @@ -1108,7 +1108,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb .setNegativeButton(R.string.no, null) .show(); } else if (mBackButtonAction == SharedPreferencesUtils.MAIN_PAGE_BACK_BUTTON_ACTION_OPEN_NAVIGATION_DRAWER) { - drawer.openDrawer(GravityCompat.START); + drawer.open(); } else { super.onBackPressed(); } |