diff --git a/appnav/src/main/kotlin/io/element/android/appnav/root/RootEvents.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootEvents.kt deleted file mode 100644 index a10274be61..0000000000 --- a/appnav/src/main/kotlin/io/element/android/appnav/root/RootEvents.kt +++ /dev/null @@ -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 diff --git a/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt index c62c8c5867..9ac4d34b98 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt @@ -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 ) } } diff --git a/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt index 36c6d3ced9..8389e1f144 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt @@ -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 ) diff --git a/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt index 7ac7cdcffc..645fbccd0d 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt @@ -37,5 +37,4 @@ open class RootStateProvider : PreviewParameterProvider { fun aRootState() = RootState( rageshakeDetectionState = aRageshakeDetectionState(), crashDetectionState = aCrashDetectionState(), - eventSink = {} ) diff --git a/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt index ec21e83d6a..fc25ee65b1 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt @@ -45,7 +45,6 @@ fun RootView( contentAlignment = Alignment.TopCenter, ) { children() - val eventSink = state.eventSink fun onOpenBugReport() { state.crashDetectionState.eventSink(CrashDetectionEvents.ResetAppHasCrashed)