From 94748892c67fdcc2fdf2920578b6659e5956bef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=97=D0=B0=D1=86=D0=B5=D0=BF=D0=B8=D0=BD?= Date: Thu, 14 May 2020 18:02:14 +0300 Subject: [PATCH] [android] Fixed discarding the page in whats news fragment when come back to the whatsnew screen --- .../src/com/mapswithme/maps/onboarding/NewsFragment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/android/src/com/mapswithme/maps/onboarding/NewsFragment.java b/android/src/com/mapswithme/maps/onboarding/NewsFragment.java index a63429c5ed..b76ad9c0d9 100644 --- a/android/src/com/mapswithme/maps/onboarding/NewsFragment.java +++ b/android/src/com/mapswithme/maps/onboarding/NewsFragment.java @@ -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))