fix: Use Unit for completer

This commit is contained in:
Myzel394 2023-11-27 14:14:28 +01:00
parent 92d1d6582a
commit 3d17012fb7
No known key found for this signature in database
GPG Key ID: 50098FCA22080F0F

View File

@ -31,7 +31,7 @@ class VideoRecorderService :
private var activeRecording: Recording? = null
// Used to listen and check if the camera is available
private var _cameraAvailableListener = CompletableDeferred<Boolean>()
private var _cameraAvailableListener = CompletableDeferred<Unit>()
// Runs a function in the main thread
private fun runInMain(callback: () -> Unit) {
@ -61,7 +61,7 @@ class VideoRecorderService :
videoCapture
)
_cameraAvailableListener.complete(true)
_cameraAvailableListener.complete(Unit)
}
}