diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java index d39e228abb..6883aa2abd 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java @@ -159,7 +159,7 @@ public class ExploreRvAdapter extends RecyclerView.Adapter, List> res) { ExploreTabFragment fragment = weakFragment.get(); - if (res != null && fragment != null && fragment.isResumed()) { + if (res != null && fragment != null && fragment.isAdded()) { fragment.addIndexItemCards(res.first, res.second); + fragment.removeRedundantCards(); + if (!fragment.isResumed()) { + fragment.invalidateAdapter(); + } } } } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java index 3bfa4b7a14..55f81ad441 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreActivity.java @@ -373,7 +373,13 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv @Override public void savedArticlesUpdated() { - updateFragments(); + ExploreTabFragment exploreTabFragment = getExploreTabFragment(); + SavedArticlesTabFragment savedArticlesTabFragment = getSavedArticlesTabFragment(); + if (exploreTabFragment != null && savedArticlesTabFragment != null + && exploreTabFragment.isAdded() && savedArticlesTabFragment.isAdded()) { + exploreTabFragment.savedArticlesUpdated(); + savedArticlesTabFragment.savedArticlesUpdated(); + } } public static class LoadWikivoyageData extends AsyncTask {