Skip to content

Commit bb3ea5f

Browse files
Rawaalbin-mullvad
authored andcommitted
Make deviceState eagerly to prevent missing of loggedOut messages
1 parent d5b51c6 commit bb3ea5f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/DeviceRepository.kt

+1-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ class DeviceRepository(
3838
flowOf(DeviceState.Unknown)
3939
}
4040
}
41-
.stateIn(
42-
CoroutineScope(dispatcher),
43-
SharingStarted.WhileSubscribed(),
44-
DeviceState.Initial
45-
)
41+
.stateIn(CoroutineScope(dispatcher), SharingStarted.Eagerly, DeviceState.Initial)
4642

4743
private val deviceListEvents =
4844
serviceConnectionManager.connectionState.flatMapLatest { state ->

0 commit comments

Comments
 (0)