From 3cc34faa0259541f28efd732414acb06c6817193 Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Sun, 17 Dec 2023 21:54:39 +0100 Subject: [PATCH] fix: Remove unnecessary `runCatching` --- .../organisms/RecorderEventsHandler.kt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/app/myzel394/alibi/ui/components/RecorderScreen/organisms/RecorderEventsHandler.kt b/app/src/main/java/app/myzel394/alibi/ui/components/RecorderScreen/organisms/RecorderEventsHandler.kt index 746b1657..22e24a52 100644 --- a/app/src/main/java/app/myzel394/alibi/ui/components/RecorderScreen/organisms/RecorderEventsHandler.kt +++ b/app/src/main/java/app/myzel394/alibi/ui/components/RecorderScreen/organisms/RecorderEventsHandler.kt @@ -203,13 +203,11 @@ fun RecorderEventsHandler( } else { audioRecorder.stopRecording(context) - runCatching { - saveAsLastRecording(audioRecorder as RecorderModel) + saveAsLastRecording(audioRecorder as RecorderModel) - saveRecording(audioRecorder) + saveRecording(audioRecorder) - audioRecorder.destroyService(context) - } + audioRecorder.destroyService(context) } } } @@ -236,13 +234,11 @@ fun RecorderEventsHandler( } else { videoRecorder.stopRecording(context) - runCatching { - saveAsLastRecording(videoRecorder as RecorderModel) + saveAsLastRecording(videoRecorder as RecorderModel) - saveRecording(videoRecorder) + saveRecording(videoRecorder) - videoRecorder.destroyService(context) - } + videoRecorder.destroyService(context) } } }