Enforce no default value in state.
This commit is contained in:
parent
2a0f636250
commit
23c4b9041a
17 changed files with 97 additions and 44 deletions
|
|
@ -100,5 +100,5 @@ fun LogoutPreferenceViewDarkPreview() = ElementPreviewDark { ContentToPreview()
|
|||
|
||||
@Composable
|
||||
private fun ContentToPreview() {
|
||||
LogoutPreferenceView(LogoutPreferenceState())
|
||||
LogoutPreferenceView(aLogoutPreferenceState())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 = {}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue