NTP-60143 | Alfred rearch fixes (#333)

This commit is contained in:
Sayed Owais Ali
2025-05-26 21:26:34 +05:30
committed by GitHub
parent ed6b17fad9
commit 33836d5ab7

View File

@@ -54,9 +54,13 @@ internal object AlfredRecordingHandlerImpl : AlfredRecordingHandler {
val screenKey = screenType.toString()
val bitmap =
bitmapCache.getOrPut(screenKey) {
createPlaceholderScreenBitmap(screenType = screenType).getOrNull()
createPlaceholderScreenBitmap(screenType = screenType).getOrElse {
return@capturePlaceholderScreen
}
}
addScreenShotFile(scope = ioCoroutineScope, context = applicationContext, bitmap = bitmap)
bitmap?.let {
addScreenShotFile(scope = ioCoroutineScope, context = applicationContext, bitmap = it)
}
}
private suspend fun createPlaceholderScreenBitmap(screenType: ScreenType): Result<Bitmap> {