fix revertdepth not decreasing properly on backpressed

This commit is contained in:
Andrew Dolgov 2013-05-28 10:38:59 +04:00
parent 4e412ef05b
commit 339f37e5b0

View File

@ -297,17 +297,6 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
@Override
public void onBackPressed() {
if (m_slidingMenu != null && !m_slidingMenu.isMenuShowing()) {
m_slidingMenu.showMenu();
} else {
super.onBackPressed();
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
if (m_actionbarRevertDepth > 0) {
m_actionbarRevertDepth = m_actionbarRevertDepth - 1;
@ -318,8 +307,15 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
} else if (m_slidingMenu != null && !m_slidingMenu.isMenuShowing()) {
m_slidingMenu.showMenu();
} else {
finish();
super.onBackPressed();
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
onBackPressed();
return true;
case R.id.show_feeds:
setUnreadOnly(!getUnreadOnly());