From fa6380c55e23487a9c19a905746704252257c025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sikora?= Date: Wed, 30 Oct 2024 10:33:13 +0100 Subject: [PATCH] Add EoY screenshot failure logs (#3133) --- .../pocketcasts/endofyear/StoryCaptureController.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/StoryCaptureController.kt b/modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/StoryCaptureController.kt index d82eb2fc39..9b70e90954 100644 --- a/modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/StoryCaptureController.kt +++ b/modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/StoryCaptureController.kt @@ -16,6 +16,8 @@ import androidx.core.graphics.drawable.toBitmap import androidx.core.graphics.scale import au.com.shiftyjelly.pocketcasts.endofyear.ui.backgroundColor import au.com.shiftyjelly.pocketcasts.models.to.Story +import au.com.shiftyjelly.pocketcasts.utils.log.LogBuffer +import au.com.shiftyjelly.pocketcasts.utils.log.LogBuffer.TAG_CRASH import dev.shreyaspatil.capturable.controller.CaptureController import dev.shreyaspatil.capturable.controller.rememberCaptureController import java.io.File @@ -117,7 +119,8 @@ internal fun rememberStoryCaptureController(): StoryCaptureController { } file } - }.getOrNull() + }.onFailure { LogBuffer.e(TAG_CRASH, it, "Failed to create a screenshot") } + .getOrNull() _isSharing = false return file }