Skip to content

Commit 1ba3c0e

Browse files
authored
Merge branch 'master' into fix/dismissable-foreground-notification
2 parents 48a486f + 1767066 commit 1ba3c0e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/src/main/java/to/bitkit/ui/screens/wallets/send/SendRecipientScreen.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ import to.bitkit.utils.AppError
8181
import to.bitkit.utils.Logger
8282
import to.bitkit.viewmodels.SendEvent
8383
import java.util.concurrent.Executors
84+
import kotlin.coroutines.cancellation.CancellationException
8485
import androidx.camera.core.Preview as CameraPreview
8586

8687
private const val TAG = "SendRecipientScreen"
@@ -172,6 +173,7 @@ fun SendRecipientScreen(
172173
preview.surfaceProvider = previewView.surfaceProvider
173174
isCameraInitialized = true
174175
}.onFailure {
176+
if (it is CancellationException) return@onFailure
175177
Logger.error("Camera initialization failed", it, context = TAG)
176178
app?.toast(
177179
type = Toast.ToastType.ERROR,

0 commit comments

Comments
 (0)