Receive events as new flow in NewMessageViewModel

Co-authored-by: Fanchao Liu <273191+simophin@users.noreply.github.com>
This commit is contained in:
Andrew 2024-06-14 18:07:27 +09:30 committed by GitHub
parent 81d5901e72
commit f69b629053
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,7 @@ class NewMessageViewModel @Inject constructor(
val state = _state.asStateFlow()
private val _event = Channel<Event>()
val event = _event.receiveAsFlow()
val event: Flow<Event> get() = _event.receiveAsFlow()
private val _qrErrors = Channel<String>()
val qrErrors: Flow<String> = _qrErrors.receiveAsFlow()