CrashDetectionEvents -> CrashDetectionEvent

This commit is contained in:
Benoit Marty 2026-01-19 18:19:20 +01:00
parent f5c22a7489
commit 54e08f3447
6 changed files with 14 additions and 14 deletions

View file

@ -8,7 +8,7 @@
package io.element.android.features.rageshake.api.crash
sealed interface CrashDetectionEvents {
data object ResetAllCrashData : CrashDetectionEvents
data object ResetAppHasCrashed : CrashDetectionEvents
sealed interface CrashDetectionEvent {
data object ResetAllCrashData : CrashDetectionEvent
data object ResetAppHasCrashed : CrashDetectionEvent
}

View file

@ -11,5 +11,5 @@ package io.element.android.features.rageshake.api.crash
data class CrashDetectionState(
val appName: String,
val crashDetected: Boolean,
val eventSink: (CrashDetectionEvents) -> Unit
val eventSink: (CrashDetectionEvent) -> Unit
)

View file

@ -22,7 +22,7 @@ fun CrashDetectionView(
onOpenBugReport: () -> Unit = { },
) {
fun onPopupDismissed() {
state.eventSink(CrashDetectionEvents.ResetAllCrashData)
state.eventSink(CrashDetectionEvent.ResetAllCrashData)
}
if (state.crashDetected) {