Search in sources :

Example 1 with FavoritesFragment

use of forpdateam.ru.forpda.ui.fragments.favorites.FavoritesFragment in project ForPDA by RadiationX.

the class ThemeFragment method updateFavorites.

protected void updateFavorites(ThemePage themePage) {
    if (!ClientHelper.getAuthState() || themePage.getPagination().getCurrent() < themePage.getPagination().getAll())
        return;
    int topicId = themePage.getId();
    TabFragment parentTab = TabManager.get().get(getParentTag());
    if (parentTab == null) {
        parentTab = TabManager.get().getByClass(FavoritesFragment.class);
    }
    if (parentTab == null)
        return;
    if (parentTab instanceof FavoritesFragment) {
        ((FavoritesFragment) parentTab).markRead(topicId);
    } else if (parentTab instanceof TopicsFragment) {
        ((TopicsFragment) parentTab).markRead(topicId);
    }
}
Also used : FavoritesFragment(forpdateam.ru.forpda.ui.fragments.favorites.FavoritesFragment) TopicsFragment(forpdateam.ru.forpda.ui.fragments.topics.TopicsFragment) TabFragment(forpdateam.ru.forpda.ui.fragments.TabFragment) SuppressLint(android.annotation.SuppressLint)

Aggregations

SuppressLint (android.annotation.SuppressLint)1 TabFragment (forpdateam.ru.forpda.ui.fragments.TabFragment)1 FavoritesFragment (forpdateam.ru.forpda.ui.fragments.favorites.FavoritesFragment)1 TopicsFragment (forpdateam.ru.forpda.ui.fragments.topics.TopicsFragment)1