Browse Source

DownloadsActivity drawer fix

pull/24/head
Ezerous 8 years ago
parent
commit
a6b6c69666
  1. 4
      app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java
  2. 2
      app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java

4
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();
}

2
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();

Loading…
Cancel
Save