mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 10:58:34 +00:00
Fix permission bug with avatar gallery selection.
This commit is contained in:
parent
5f6d971bf7
commit
d36ec9af47
@ -112,6 +112,14 @@ public class AvatarSelectionBottomSheetDialogFragment extends BottomSheetDialogF
|
|||||||
.onAnyDenied(() -> Toast.makeText(requireContext(), R.string.AvatarSelectionBottomSheetDialogFragment__taking_a_photo_requires_the_camera_permission, Toast.LENGTH_SHORT)
|
.onAnyDenied(() -> Toast.makeText(requireContext(), R.string.AvatarSelectionBottomSheetDialogFragment__taking_a_photo_requires_the_camera_permission, Toast.LENGTH_SHORT)
|
||||||
.show())
|
.show())
|
||||||
.execute();
|
.execute();
|
||||||
|
} else if (option == SelectionOption.GALLERY) {
|
||||||
|
Permissions.with(this)
|
||||||
|
.request(Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||||
|
.ifNecessary()
|
||||||
|
.onAllGranted(() -> launchOptionAndDismiss(option))
|
||||||
|
.onAnyDenied(() -> Toast.makeText(requireContext(), R.string.AvatarSelectionBottomSheetDialogFragment__viewing_your_gallery_requires_the_storage_permission, Toast.LENGTH_SHORT)
|
||||||
|
.show())
|
||||||
|
.execute();
|
||||||
} else {
|
} else {
|
||||||
launchOptionAndDismiss(option);
|
launchOptionAndDismiss(option);
|
||||||
}
|
}
|
||||||
|
@ -427,6 +427,7 @@
|
|||||||
<string name="AvatarSelectionBottomSheetDialogFragment__choose_from_gallery">Choose from gallery</string>
|
<string name="AvatarSelectionBottomSheetDialogFragment__choose_from_gallery">Choose from gallery</string>
|
||||||
<string name="AvatarSelectionBottomSheetDialogFragment__remove_photo">Remove photo</string>
|
<string name="AvatarSelectionBottomSheetDialogFragment__remove_photo">Remove photo</string>
|
||||||
<string name="AvatarSelectionBottomSheetDialogFragment__taking_a_photo_requires_the_camera_permission">Taking a photo requires the camera permission.</string>
|
<string name="AvatarSelectionBottomSheetDialogFragment__taking_a_photo_requires_the_camera_permission">Taking a photo requires the camera permission.</string>
|
||||||
|
<string name="AvatarSelectionBottomSheetDialogFragment__viewing_your_gallery_requires_the_storage_permission">Viewing your gallery requires the storage permission.</string>
|
||||||
|
|
||||||
<!-- DateUtils -->
|
<!-- DateUtils -->
|
||||||
<string name="DateUtils_just_now">Now</string>
|
<string name="DateUtils_just_now">Now</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user