mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
refactor: Small improvement
This commit is contained in:
parent
9202c21125
commit
cfec7147fb
@ -177,6 +177,8 @@ fun VideoRecorderPreparationSheet(
|
|||||||
|
|
||||||
val label =
|
val label =
|
||||||
stringResource(R.string.ui_videoRecorder_action_start_settings_start_label)
|
stringResource(R.string.ui_videoRecorder_action_start_settings_start_label)
|
||||||
|
val hasGrantedCameraPermission =
|
||||||
|
PermissionHelper.hasGranted(context, Manifest.permission.CAMERA)
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
@ -202,7 +204,9 @@ fun VideoRecorderPreparationSheet(
|
|||||||
.pointerInput(Unit) {
|
.pointerInput(Unit) {
|
||||||
detectTapGestures(
|
detectTapGestures(
|
||||||
onLongPress = {
|
onLongPress = {
|
||||||
onPreviewVisible()
|
if (hasGrantedCameraPermission) {
|
||||||
|
onPreviewVisible()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onTap = {
|
onTap = {
|
||||||
trigger()
|
trigger()
|
||||||
@ -220,7 +224,7 @@ fun VideoRecorderPreparationSheet(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PermissionHelper.hasGranted(context, Manifest.permission.CAMERA)) {
|
if (hasGrantedCameraPermission) {
|
||||||
Text(
|
Text(
|
||||||
stringResource(
|
stringResource(
|
||||||
R.string.ui_videoRecorder_action_preview_label
|
R.string.ui_videoRecorder_action_preview_label
|
||||||
|
Loading…
x
Reference in New Issue
Block a user