From a6b6c69666a05250f59a90c694fcf33a2ef401e8 Mon Sep 17 00:00:00 2001 From: Ezerous Date: Thu, 19 Jan 2017 22:58:16 +0200 Subject: [PATCH] DownloadsActivity drawer fix --- .../thmmy/mthmmy/activities/downloads/DownloadsActivity.java | 4 ++-- app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java index ced0db58..a249627a 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java @@ -89,7 +89,7 @@ public class DownloadsActivity extends BaseActivity implements DownloadsAdapter. getSupportActionBar().setDisplayShowHomeEnabled(true); createDrawer(); -// drawer.setSelection(DOWNLOADS_ID); + drawer.setSelection(DOWNLOADS_ID); progressBar = (MaterialProgressBar) findViewById(R.id.progressBar); @@ -149,7 +149,7 @@ public class DownloadsActivity extends BaseActivity implements DownloadsAdapter. @Override protected void onResume() { - drawer.setSelection(-1); + drawer.setSelection(DOWNLOADS_ID); super.onResume(); } diff --git a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java index 1f893856..814d2224 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java @@ -228,7 +228,7 @@ public abstract class BaseActivity extends AppCompatActivity { startActivity(i); } } else if (drawerItem.equals(DOWNLOADS_ID)) { - if (sessionManager.isLoggedIn()) //When logged out or if user is guest + if (!(BaseActivity.this instanceof DownloadsActivity)) //When logged out or if user is guest { Intent i = new Intent(BaseActivity.this, DownloadsActivity.class); Bundle extras = new Bundle();