mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Adding distinctUntilChanged for flow of remote toggle via Pusher capability
This commit is contained in:
parent
163bf57fda
commit
ba5a433caf
@ -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()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user