Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import to.bitkit.utils.AppError
import to.bitkit.utils.Logger
import to.bitkit.viewmodels.SendEvent
import java.util.concurrent.Executors
import kotlin.coroutines.cancellation.CancellationException
import androidx.camera.core.Preview as CameraPreview

private const val TAG = "SendRecipientScreen"
Expand Down Expand Up @@ -172,6 +173,7 @@ fun SendRecipientScreen(
preview.surfaceProvider = previewView.surfaceProvider
isCameraInitialized = true
}.onFailure {
if (it is CancellationException) return@onFailure
Logger.error("Camera initialization failed", it, context = TAG)
app?.toast(
type = Toast.ToastType.ERROR,
Expand Down
Loading