|
@ -14,6 +14,7 @@ import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
import awais.instagrabber.BuildConfig; |
|
|
import awais.instagrabber.BuildConfig; |
|
|
import awais.instagrabber.R; |
|
|
import awais.instagrabber.R; |
|
|
|
|
|
import awaisomereport.CrashReporterHelper; |
|
|
|
|
|
|
|
|
import static awais.instagrabber.utils.Utils.settingsHelper; |
|
|
import static awais.instagrabber.utils.Utils.settingsHelper; |
|
|
|
|
|
|
|
@ -70,7 +71,7 @@ public final class FlavorTown { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static void changelogCheck(@NonNull final Context context) { |
|
|
public static void changelogCheck(@NonNull final Context context) { |
|
|
if (settingsHelper.getInteger(Constants.PREV_INSTALL_VERSION) < BuildConfig.VERSION_CODE) { |
|
|
|
|
|
|
|
|
if (settingsHelper.getInteger(Constants.PREV_INSTALL_VERSION) >= BuildConfig.VERSION_CODE) return; |
|
|
int appUaCode = settingsHelper.getInteger(Constants.APP_UA_CODE); |
|
|
int appUaCode = settingsHelper.getInteger(Constants.APP_UA_CODE); |
|
|
int browserUaCode = settingsHelper.getInteger(Constants.BROWSER_UA_CODE); |
|
|
int browserUaCode = settingsHelper.getInteger(Constants.BROWSER_UA_CODE); |
|
|
if (browserUaCode == -1 || browserUaCode >= UserAgentUtils.browsers.length) { |
|
|
if (browserUaCode == -1 || browserUaCode >= UserAgentUtils.browsers.length) { |
|
@ -85,8 +86,8 @@ public final class FlavorTown { |
|
|
settingsHelper.putString(Constants.APP_UA, appUa); |
|
|
settingsHelper.putString(Constants.APP_UA, appUa); |
|
|
final String browserUa = UserAgentUtils.generateBrowserUA(browserUaCode); |
|
|
final String browserUa = UserAgentUtils.generateBrowserUA(browserUaCode); |
|
|
settingsHelper.putString(Constants.BROWSER_UA, browserUa); |
|
|
settingsHelper.putString(Constants.BROWSER_UA, browserUa); |
|
|
|
|
|
CrashReporterHelper.deleteAllStacktraceFiles(context); |
|
|
Toast.makeText(context, R.string.updated, Toast.LENGTH_SHORT).show(); |
|
|
Toast.makeText(context, R.string.updated, Toast.LENGTH_SHORT).show(); |
|
|
settingsHelper.putInteger(Constants.PREV_INSTALL_VERSION, BuildConfig.VERSION_CODE); |
|
|
settingsHelper.putInteger(Constants.PREV_INSTALL_VERSION, BuildConfig.VERSION_CODE); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|