Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 1552c151 authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #3785 from wiktor-k/fix-notifications

Fix NPE when accessing settings screens
parents 8f699ee5 5c2bb438
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -165,10 +165,12 @@ class AccountSettingsFragment : PreferenceFragmentCompat() {
    }

    private fun initializeNotifications() {
        findPreference(PREFERENCE_OPEN_NOTIFICATION_SETTINGS)?.let {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                PRE_SDK26_NOTIFICATION_PREFERENCES.forEach { findPreference(it).remove() }
            } else {
            findPreference(PREFERENCE_OPEN_NOTIFICATION_SETTINGS).remove()
                it.remove()
            }
        }
    }