properly unmark categories when going back
This commit is contained in:
parent
5aaba5a070
commit
c8a5161d4f
@ -337,4 +337,8 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
|
||||
m_selectedCatId = cat.id;
|
||||
m_adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setSelectedCategoryId(int id) {
|
||||
m_selectedCatId = id;
|
||||
}
|
||||
}
|
||||
|
@ -764,6 +764,13 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
|
||||
findViewById(R.id.feeds_fragment).setVisibility(View.GONE);
|
||||
|
||||
m_activeCategory = null;
|
||||
|
||||
FeedCategoriesFragment cf = (FeedCategoriesFragment) getSupportFragmentManager()
|
||||
.findFragmentById(R.id.cats_fragment);
|
||||
|
||||
if (cf != null) {
|
||||
cf.setSelectedCategoryId(0);
|
||||
}
|
||||
|
||||
initMainMenu();
|
||||
refreshCategories();
|
||||
@ -794,12 +801,19 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
|
||||
R.anim.slide_right));
|
||||
}
|
||||
|
||||
if (m_activeFeed != null && m_activeFeed.is_cat) {
|
||||
if (m_activeFeed.is_cat) {
|
||||
findViewById(R.id.cats_fragment)
|
||||
.setVisibility(View.VISIBLE);
|
||||
findViewById(R.id.headlines_fragment).setVisibility(
|
||||
View.GONE);
|
||||
|
||||
FeedCategoriesFragment cf = (FeedCategoriesFragment) getSupportFragmentManager()
|
||||
.findFragmentById(R.id.cats_fragment);
|
||||
|
||||
if (cf != null) {
|
||||
cf.setSelectedCategoryId(0);
|
||||
}
|
||||
|
||||
refreshCategories();
|
||||
} else {
|
||||
findViewById(R.id.feeds_fragment).setVisibility(
|
||||
|
Loading…
Reference in New Issue
Block a user