CrashDetectionEvents -> CrashDetectionEvent
This commit is contained in:
parent
f5c22a7489
commit
54e08f3447
6 changed files with 14 additions and 14 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ fun CrashDetectionView(
|
|||
onOpenBugReport: () -> Unit = { },
|
||||
) {
|
||||
fun onPopupDismissed() {
|
||||
state.eventSink(CrashDetectionEvents.ResetAllCrashData)
|
||||
state.eventSink(CrashDetectionEvent.ResetAllCrashData)
|
||||
}
|
||||
|
||||
if (state.crashDetected) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue