[android] Fixed discarding the page in whats news fragment when come back to the whatsnew screen

This commit is contained in:
Александр Зацепин 2020-05-14 18:02:14 +03:00 committed by yoksnod
parent 976aebe459
commit 94748892c6

View file

@ -1,12 +1,12 @@
package com.mapswithme.maps.onboarding;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import com.mapswithme.maps.BuildConfig;
import com.mapswithme.maps.R;
import com.mapswithme.maps.downloader.UpdaterDialogFragment;
@ -100,6 +100,10 @@ public class NewsFragment extends BaseNewsFragment
if (f != null)
return UpdaterDialogFragment.showOn(activity, listener);
f = fm.findFragmentByTag(NewsFragment.class.getName());
if (f != null)
return true;
String currentTitle = getCurrentTitleConcatenation(activity.getApplicationContext());
String oldTitle = SharedPropertiesUtils.getWhatsNewTitleConcatenation();
if (currentTitle.equals(oldTitle) && !recreate(activity, NewsFragment.class))