Remove useless check
This commit is contained in:
parent
a29ec7b0be
commit
71446a1a74
|
@ -161,10 +161,8 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor(
|
||||||
val switchPref = preference as SwitchPreference
|
val switchPref = preference as SwitchPreference
|
||||||
if (switchPref.isChecked) {
|
if (switchPref.isChecked) {
|
||||||
FcmHelper.getFcmToken(requireContext())?.let {
|
FcmHelper.getFcmToken(requireContext())?.let {
|
||||||
if (vectorPreferences.areNotificationEnabledForDevice()) {
|
|
||||||
pushManager.registerPusherWithFcmKey(it)
|
pushManager.registerPusherWithFcmKey(it)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
FcmHelper.getFcmToken(requireContext())?.let {
|
FcmHelper.getFcmToken(requireContext())?.let {
|
||||||
pushManager.unregisterPusher(it, object : MatrixCallback<Unit> {
|
pushManager.unregisterPusher(it, object : MatrixCallback<Unit> {
|
||||||
|
|
Loading…
Reference in New Issue