diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportEvents.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportEvents.kt index 372805bca5..9765f83da0 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportEvents.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportEvents.kt @@ -23,7 +23,6 @@ sealed interface BugReportEvents { data class SetDescription(val description: String) : BugReportEvents data class SetSendLog(val sendLog: Boolean) : BugReportEvents - data class SetSendCrashLog(val sendCrashlog: Boolean) : BugReportEvents data class SetCanContact(val canContact: Boolean) : BugReportEvents data class SetSendScreenshot(val sendScreenshot: Boolean) : BugReportEvents } diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt index 1a472d0820..5fd95e79bd 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt @@ -100,9 +100,6 @@ class BugReportPresenter @Inject constructor( is BugReportEvents.SetCanContact -> updateFormState(formState) { copy(canContact = event.canContact) } - is BugReportEvents.SetSendCrashLog -> updateFormState(formState) { - copy(sendCrashLogs = event.sendCrashlog) - } is BugReportEvents.SetSendLog -> updateFormState(formState) { copy(sendLogs = event.sendLog) } @@ -138,7 +135,7 @@ class BugReportPresenter @Inject constructor( bugReporter.sendBugReport( reportType = ReportType.BUG_REPORT, withDevicesLogs = formState.sendLogs, - withCrashLogs = hasCrashLogs && formState.sendCrashLogs, + withCrashLogs = hasCrashLogs && formState.sendLogs, withKeyRequestHistory = false, withScreenshot = formState.sendScreenshot, theBugDescription = formState.description, diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt index 3300693973..b8bbe62dc6 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt @@ -36,7 +36,6 @@ data class BugReportState( data class BugReportFormState( val description: String, val sendLogs: Boolean, - val sendCrashLogs: Boolean, val canContact: Boolean, val sendScreenshot: Boolean ) : Parcelable { @@ -44,7 +43,6 @@ data class BugReportFormState( val Default = BugReportFormState( description = "", sendLogs = true, - sendCrashLogs = true, canContact = false, sendScreenshot = false ) diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt index c4e5b78960..9ae2ea792e 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt @@ -111,14 +111,6 @@ fun BugReportView( enabled = isFormEnabled, title = stringResource(id = R.string.screen_bug_report_include_logs), ) - if (state.hasCrashLogs) { - PreferenceSwitch( - isChecked = state.formState.sendCrashLogs, - onCheckedChange = { eventSink(BugReportEvents.SetSendCrashLog(it)) }, - enabled = isFormEnabled, - title = stringResource(id = R.string.screen_bug_report_include_crash_logs), - ) - } PreferenceSwitch( isChecked = state.formState.canContact, onCheckedChange = { eventSink(BugReportEvents.SetCanContact(it)) }, diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt index 3df6c62287..9b868a637d 100644 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt @@ -92,26 +92,6 @@ class BugReportPresenterTest { } } - @Test - fun `present - send crash logs`() = runTest { - val presenter = BugReportPresenter( - FakeBugReporter(), - FakeCrashDataStore(), - FakeScreenshotHolder(), - this, - ) - moleculeFlow(RecompositionClock.Immediate) { - presenter.present() - }.test { - val initialState = awaitItem() - // Since this is true by default, start by disabling - initialState.eventSink.invoke(BugReportEvents.SetSendCrashLog(false)) - assertThat(awaitItem().formState).isEqualTo(BugReportFormState.Default.copy(sendCrashLogs = false)) - initialState.eventSink.invoke(BugReportEvents.SetSendCrashLog(true)) - assertThat(awaitItem().formState).isEqualTo(BugReportFormState.Default.copy(sendCrashLogs = true)) - } - } - @Test fun `present - send logs`() = runTest { val presenter = BugReportPresenter(