Adding distinctUntilChanged for flow of remote toggle via Pusher capability

This commit is contained in:
Maxime NATUREL 2022-11-08 17:19:06 +01:00
parent 163bf57fda
commit ba5a433caf
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@ package im.vector.app.features.settings.devices.v2.notification
import androidx.lifecycle.asFlow
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.flow.unwrap
@ -32,5 +33,6 @@ class CanTogglePushNotificationsViaPusherUseCase @Inject constructor() {
.asFlow()
.unwrap()
.map { it.canRemotelyTogglePushNotificationsOfDevices }
.distinctUntilChanged()
}
}