This commit is contained in:
Benoit Marty
2023-05-05 15:38:21 +02:00
parent f881bd849d
commit f5a8805640
5 changed files with 0 additions and 26 deletions

View File

@@ -1,19 +0,0 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.appnav.root
sealed interface RootEvents

View File

@@ -32,13 +32,9 @@ class RootPresenter @Inject constructor(
val rageshakeDetectionState = rageshakeDetectionPresenter.present()
val crashDetectionState = crashDetectionPresenter.present()
fun handleEvent(@Suppress("UNUSED_PARAMETER") event: RootEvents) {
}
return RootState(
rageshakeDetectionState = rageshakeDetectionState,
crashDetectionState = crashDetectionState,
eventSink = ::handleEvent
)
}
}

View File

@@ -24,5 +24,4 @@ import io.element.android.features.rageshake.api.detection.RageshakeDetectionSta
data class RootState(
val rageshakeDetectionState: RageshakeDetectionState,
val crashDetectionState: CrashDetectionState,
val eventSink: (RootEvents) -> Unit
)

View File

@@ -37,5 +37,4 @@ open class RootStateProvider : PreviewParameterProvider<RootState> {
fun aRootState() = RootState(
rageshakeDetectionState = aRageshakeDetectionState(),
crashDetectionState = aCrashDetectionState(),
eventSink = {}
)

View File

@@ -45,7 +45,6 @@ fun RootView(
contentAlignment = Alignment.TopCenter,
) {
children()
val eventSink = state.eventSink
fun onOpenBugReport() {
state.crashDetectionState.eventSink(CrashDetectionEvents.ResetAppHasCrashed)