We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed9a2e0 commit 7f7afe8Copy full SHA for 7f7afe8
1 file changed
app/src/main/java/to/bitkit/ui/screens/wallets/send/SendRecipientScreen.kt
@@ -81,6 +81,7 @@ import to.bitkit.utils.AppError
81
import to.bitkit.utils.Logger
82
import to.bitkit.viewmodels.SendEvent
83
import java.util.concurrent.Executors
84
+import kotlin.coroutines.cancellation.CancellationException
85
import androidx.camera.core.Preview as CameraPreview
86
87
private const val TAG = "SendRecipientScreen"
@@ -172,6 +173,7 @@ fun SendRecipientScreen(
172
173
preview.surfaceProvider = previewView.surfaceProvider
174
isCameraInitialized = true
175
}.onFailure {
176
+ if (it is CancellationException) return@onFailure
177
Logger.error("Camera initialization failed", it, context = TAG)
178
app?.toast(
179
type = Toast.ToastType.ERROR,
0 commit comments