mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Enforce no default value in state.
This commit is contained in:
committed by
Benoit Marty
parent
a77479ed05
commit
0f0c001c3c
+1
-1
@@ -100,5 +100,5 @@ fun LogoutPreferenceViewDarkPreview() = ElementPreviewDark { ContentToPreview()
|
||||
|
||||
@Composable
|
||||
private fun ContentToPreview() {
|
||||
LogoutPreferenceView(LogoutPreferenceState())
|
||||
LogoutPreferenceView(aLogoutPreferenceState())
|
||||
}
|
||||
|
||||
+7
-2
@@ -19,6 +19,11 @@ package io.element.android.features.logout
|
||||
import io.element.android.libraries.architecture.Async
|
||||
|
||||
data class LogoutPreferenceState(
|
||||
val logoutAction: Async<Unit> = Async.Uninitialized,
|
||||
val eventSink: (LogoutPreferenceEvents) -> Unit = {},
|
||||
val logoutAction: Async<Unit>,
|
||||
val eventSink: (LogoutPreferenceEvents) -> Unit,
|
||||
)
|
||||
|
||||
fun aLogoutPreferenceState() = LogoutPreferenceState(
|
||||
logoutAction = Async.Uninitialized,
|
||||
eventSink = {}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user