Remove useless check

This commit is contained in:
Benoit Marty 2020-03-06 17:11:23 +01:00
parent a29ec7b0be
commit 71446a1a74
1 changed files with 1 additions and 3 deletions

View File

@ -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> {