offline: properly deselect current category when closing headlines
This commit is contained in:
parent
714efd1ed0
commit
8af33e3d7c
@ -333,12 +333,19 @@ public class OfflineActivity extends FragmentActivity implements
|
|||||||
OfflineFeedsFragment ff = (OfflineFeedsFragment) getSupportFragmentManager()
|
OfflineFeedsFragment ff = (OfflineFeedsFragment) getSupportFragmentManager()
|
||||||
.findFragmentByTag(FRAG_FEEDS);
|
.findFragmentByTag(FRAG_FEEDS);
|
||||||
|
|
||||||
|
OfflineFeedCategoriesFragment cf = (OfflineFeedCategoriesFragment) getSupportFragmentManager()
|
||||||
|
.findFragmentByTag(FRAG_CATS);
|
||||||
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
ft.replace(R.id.headlines_fragment, new DummyFragment(), "");
|
ft.replace(R.id.headlines_fragment, new DummyFragment(), "");
|
||||||
ft.commit();
|
ft.commit();
|
||||||
|
|
||||||
if (ff != null) {
|
if (ff != null) {
|
||||||
ff.setSelectedFeedId(-1);
|
ff.setSelectedFeedId(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cf != null) {
|
||||||
|
cf.setSelectedFeedId(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshViews();
|
refreshViews();
|
||||||
@ -814,7 +821,7 @@ public class OfflineActivity extends FragmentActivity implements
|
|||||||
if (!m_smallScreenMode) {
|
if (!m_smallScreenMode) {
|
||||||
getActionBar().setDisplayHomeAsUpEnabled(m_selectedArticleId != 0);
|
getActionBar().setDisplayHomeAsUpEnabled(m_selectedArticleId != 0);
|
||||||
} else {
|
} else {
|
||||||
getActionBar().setDisplayHomeAsUpEnabled(m_selectedArticleId != 0 || m_activeFeedId != 0);
|
getActionBar().setDisplayHomeAsUpEnabled(m_selectedArticleId != 0 || m_activeFeedId != 0 || m_activeCatId != -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1288,7 +1295,7 @@ public class OfflineActivity extends FragmentActivity implements
|
|||||||
ft.replace(R.id.feeds_fragment, new OfflineFeedCategoriesFragment(), FRAG_CATS);
|
ft.replace(R.id.feeds_fragment, new OfflineFeedCategoriesFragment(), FRAG_CATS);
|
||||||
}
|
}
|
||||||
ft.commit();
|
ft.commit();
|
||||||
|
|
||||||
initMainMenu();
|
initMainMenu();
|
||||||
|
|
||||||
refreshViews();
|
refreshViews();
|
||||||
|
Loading…
Reference in New Issue
Block a user