From 4d3e3b47e4a779280621526220702275fb806735 Mon Sep 17 00:00:00 2001 From: Stefan Arentz Date: Thu, 9 Nov 2017 20:54:29 -0500 Subject: [PATCH] Bug 1416075 - Only show the What's New page on major upgrades (#3435) --- Client/Frontend/Browser/BrowserViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Client/Frontend/Browser/BrowserViewController.swift b/Client/Frontend/Browser/BrowserViewController.swift index bb14514501fa..c9f3ac2196c4 100644 --- a/Client/Frontend/Browser/BrowserViewController.swift +++ b/Client/Frontend/Browser/BrowserViewController.swift @@ -571,9 +571,14 @@ class BrowserViewController: UIViewController { showQueuedAlertIfAvailable() } + // THe logic for shouldShowWhatsNewTab is as follows: If we do not have the LatestAppVersionProfileKey in + // the profile, that means that this is a fresh install and we do not show the What's New. If we do have + // that value, we compare it to the major version of the running app. If it is different then this is an + // upgrade, downgrades are not possible, so we can show the What's New page. + fileprivate func shouldShowWhatsNewTab() -> Bool { guard let latestMajorAppVersion = profile.prefs.stringForKey(LatestAppVersionProfileKey)?.components(separatedBy: ".").first else { - return DeviceInfo.hasConnectivity() + return false // Clean install, never show What's New } return latestMajorAppVersion != AppInfo.majorAppVersion && DeviceInfo.hasConnectivity()