From 61f6713645f1914baa280460eb480523a357cbf3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 8 Nov 2014 04:18:47 +0400 Subject: [PATCH] another attempt at fixing the shortcut-mode drawer strangeness while retaining overall back navigation --- org.fox.ttrss/src/main/AndroidManifest.xml | 4 ++-- .../org/fox/ttrss/FeedCategoriesFragment.java | 2 +- .../main/java/org/fox/ttrss/FeedsActivity.java | 16 ++++++++++++---- .../main/java/org/fox/ttrss/FeedsFragment.java | 2 +- .../fox/ttrss/offline/OfflineFeedsActivity.java | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/org.fox.ttrss/src/main/AndroidManifest.xml b/org.fox.ttrss/src/main/AndroidManifest.xml index d215d256..c1b92111 100644 --- a/org.fox.ttrss/src/main/AndroidManifest.xml +++ b/org.fox.ttrss/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="276" + android:versionName="1.68" > 0) { + (getSupportFragmentManager().getBackStackEntryCount() > 0 || m_userFeedSelected)) { m_drawerLayout.openDrawer(Gravity.START); } else { @@ -399,6 +406,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe super.onSaveInstanceState(out); out.putBoolean("feedIsSelected", m_feedIsSelected); + out.putBoolean("userFeedSelected", m_userFeedSelected); GlobalState.getInstance().save(out); } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java index 633e52c2..31dc0ae4 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java @@ -568,7 +568,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh if (m_enableFeedIcons && !m_feedIconsChecked && Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) getFeedIcons(); - + return; } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java index 382d6baf..5e08f515 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsActivity.java @@ -265,7 +265,7 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead @Override public void onBackPressed() { if (m_drawerLayout != null && !m_drawerLayout.isDrawerOpen(Gravity.START) && - getSupportFragmentManager().getBackStackEntryCount() > 0) { + (getSupportFragmentManager().getBackStackEntryCount() > 0 || m_feedIsSelected)) { m_drawerLayout.openDrawer(Gravity.START); } else {