CategoryNavigationEntry: check if fragment is missing before enabling it
This commit is contained in:
parent
623aac676e
commit
4e4739af55
@ -183,15 +183,17 @@ public class MainActivity extends CommonActivity implements OnlineServices {
|
|||||||
if (m_activeFeed.is_cat) {
|
if (m_activeFeed.is_cat) {
|
||||||
FeedCategoriesFragment cats = (FeedCategoriesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_CATS);
|
FeedCategoriesFragment cats = (FeedCategoriesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_CATS);
|
||||||
|
|
||||||
ft.show(cats);
|
if (cats != null) {
|
||||||
|
ft.show(cats);
|
||||||
cats.setSelectedCategory(null);
|
cats.setSelectedCategory(null);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
|
||||||
|
|
||||||
ft.show(feeds);
|
if (feeds != null) {
|
||||||
|
ft.show(feeds);
|
||||||
feeds.setSelectedFeed(null);
|
feeds.setSelectedFeed(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user