Use appropriate icons for toasts (#4803)
* use appropriate icons for toasts * use info for session expiry * tweak size * message -> safeMessage --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
This commit is contained in:
@@ -66,7 +66,10 @@ function LightboxFooter({imageIndex}: {imageIndex: number}) {
|
||||
const saveImageToAlbumWithToasts = React.useCallback(
|
||||
async (uri: string) => {
|
||||
if (!permissionResponse || permissionResponse.granted === false) {
|
||||
Toast.show(_(msg`Permission to access camera roll is required.`))
|
||||
Toast.show(
|
||||
_(msg`Permission to access camera roll is required.`),
|
||||
'info',
|
||||
)
|
||||
if (permissionResponse?.canAskAgain) {
|
||||
requestPermission()
|
||||
} else {
|
||||
@@ -74,6 +77,7 @@ function LightboxFooter({imageIndex}: {imageIndex: number}) {
|
||||
_(
|
||||
msg`Permission to access camera roll was denied. Please enable it in your system settings.`,
|
||||
),
|
||||
'xmark',
|
||||
)
|
||||
}
|
||||
return
|
||||
@@ -83,7 +87,7 @@ function LightboxFooter({imageIndex}: {imageIndex: number}) {
|
||||
await saveImageToMediaLibrary({uri})
|
||||
Toast.show(_(msg`Saved to your camera roll`))
|
||||
} catch (e: any) {
|
||||
Toast.show(_(msg`Failed to save image: ${String(e)}`))
|
||||
Toast.show(_(msg`Failed to save image: ${String(e)}`), 'xmark')
|
||||
}
|
||||
},
|
||||
[permissionResponse, requestPermission, _],
|
||||
|
||||
Reference in New Issue
Block a user