mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Remove default value for lambda.
We enforce a value to be provided and it's better for code coverage.
This commit is contained in:
@@ -134,8 +134,8 @@ class RootFlowNode @AssistedInject constructor(
|
||||
|
||||
private suspend fun restoreSessionIfNeeded(
|
||||
sessionId: SessionId,
|
||||
onFailure: () -> Unit = {},
|
||||
onSuccess: (SessionId) -> Unit = {},
|
||||
onFailure: () -> Unit,
|
||||
onSuccess: (SessionId) -> Unit,
|
||||
) {
|
||||
matrixClientsHolder.getOrRestore(sessionId)
|
||||
.onSuccess {
|
||||
@@ -149,8 +149,8 @@ class RootFlowNode @AssistedInject constructor(
|
||||
}
|
||||
|
||||
private suspend fun tryToRestoreLatestSession(
|
||||
onSuccess: (SessionId) -> Unit = {},
|
||||
onFailure: () -> Unit = {}
|
||||
onSuccess: (SessionId) -> Unit,
|
||||
onFailure: () -> Unit
|
||||
) {
|
||||
val latestSessionId = authenticationService.getLatestSessionId()
|
||||
if (latestSessionId == null) {
|
||||
|
||||
@@ -35,8 +35,8 @@ import io.element.android.services.apperror.impl.AppErrorView
|
||||
@Composable
|
||||
fun RootView(
|
||||
state: RootState,
|
||||
onOpenBugReport: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
onOpenBugReport: () -> Unit = {},
|
||||
children: @Composable BoxScope.() -> Unit,
|
||||
) {
|
||||
Box(
|
||||
@@ -69,7 +69,10 @@ fun RootView(
|
||||
@PreviewsDayNight
|
||||
@Composable
|
||||
internal fun RootPreview(@PreviewParameter(RootStateProvider::class) rootState: RootState) = ElementPreview {
|
||||
RootView(rootState) {
|
||||
RootView(
|
||||
state = rootState,
|
||||
onOpenBugReport = {},
|
||||
) {
|
||||
Text("Children")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user