fix: issue in which camera nonpresence can cause a crash
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
e69fd44108
commit
ae335c1226
|
|
@ -575,7 +575,18 @@ fun ChannelScreen(
|
|||
contentValues
|
||||
)
|
||||
|
||||
pickCameraLauncher.launch(capturedPhotoUri.value)
|
||||
try {
|
||||
pickCameraLauncher.launch(capturedPhotoUri.value)
|
||||
} catch (e: Exception) {
|
||||
Toast.makeText(
|
||||
context,
|
||||
context.getString(
|
||||
R.string.file_picker_chip_camera_none_installed
|
||||
),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
|
||||
viewModel.currentBottomPane = BottomPane.None
|
||||
},
|
||||
onClose = {
|
||||
|
|
|
|||
|
|
@ -447,6 +447,7 @@
|
|||
<string name="file_picker_permission_unpartialise_request_cta">Allow full access</string>
|
||||
<string name="file_picker_chip_documents">Attach a file</string>
|
||||
<string name="file_picker_chip_camera">Take a photo</string>
|
||||
<string name="file_picker_chip_camera_none_installed">No camera app installed</string>
|
||||
|
||||
<string name="inline_media_picker_current_description">Currently selected media</string>
|
||||
<string name="inline_media_picker_no_media_placeholder">Pick media…</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue