Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
For #6522 Focus Nightly crashes when accessing Your Rights page
Browse files Browse the repository at this point in the history
  • Loading branch information
iorgamgabriel authored and mergify[bot] committed Mar 8, 2022
1 parent f90c9d2 commit 3aa0e18
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ class MozillaSettingsFragment :
}

override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
TelemetryWrapper.settingsEvent(key, sharedPreferences.all[key].toString())
ProTips.tipsSettingChanged.record(
ProTips.TipsSettingChangedExtra(sharedPreferences.all[key] as Boolean)
)
if (isAdded && key == requireContext().getString(R.string.pref_key_homescreen_tips)) {
TelemetryWrapper.settingsEvent(key, sharedPreferences.all[key].toString())
ProTips.tipsSettingChanged.record(
ProTips.TipsSettingChangedExtra(sharedPreferences.all[key] as Boolean)
)
}
}

companion object {
Expand Down

0 comments on commit 3aa0e18

Please sign in to comment.