Open new episodes when removing the currently shown feed via drawer

This commit is contained in:
Martin Fietz 2015-07-12 21:37:38 +02:00
parent b8b36b4ee8
commit a831f01eeb
1 changed files with 4 additions and 1 deletions

View File

@ -514,7 +514,7 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
|| ((ListView)menuInfo.targetView.getParent()).getId() != R.id.nav_list) { || ((ListView)menuInfo.targetView.getParent()).getId() != R.id.nav_list) {
return false; return false;
} }
int position = menuInfo.position; final int position = menuInfo.position;
Feed feed = navDrawerData.feeds.get(position - navAdapter.getSubscriptionOffset()); Feed feed = navDrawerData.feeds.get(position - navAdapter.getSubscriptionOffset());
switch(item.getItemId()) { switch(item.getItemId()) {
case R.id.mark_all_seen_item: case R.id.mark_all_seen_item:
@ -528,6 +528,9 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
@Override @Override
protected void onPostExecute(Void result) { protected void onPostExecute(Void result) {
super.onPostExecute(result); super.onPostExecute(result);
if(getSelectedNavListIndex() == position) {
loadFragment(NewEpisodesFragment.TAG, null);
}
} }
}; };
ConfirmationDialog conDialog = new ConfirmationDialog(this, ConfirmationDialog conDialog = new ConfirmationDialog(this,