For 19804:Fixed call order in the

upstream-sync
Marc Leclair 3 years ago committed by mergify[bot]
parent b8bbdb45bc
commit db01fab8a9

@ -476,9 +476,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/ */
fun checkDefaultBrowserAndSet(): Boolean { fun checkDefaultBrowserAndSet(): Boolean {
val prefKey = appContext.getPreferenceKey(R.string.pref_key_default_browser) val prefKey = appContext.getPreferenceKey(R.string.pref_key_default_browser)
val isDefaultBrowser = isDefaultBrowser() val isDefaultBrowserNow = isDefaultBrowser()
this.preferences.edit().putBoolean(prefKey, isDefaultBrowser).apply() val isDefaultBrowserBefore = this.preferences.getBoolean(prefKey, isDefaultBrowserNow)
return this.preferences.getBoolean(prefKey, isDefaultBrowser) != isDefaultBrowser this.preferences.edit().putBoolean(prefKey, isDefaultBrowserNow).apply()
return isDefaultBrowserNow != isDefaultBrowserBefore
} }
/** /**

Loading…
Cancel
Save