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:
Samuel Newman 2024-07-23 15:01:04 +01:00 committed by GitHub
parent 59bafb426f
commit 27d712290a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 134 additions and 95 deletions

View file

@ -205,6 +205,7 @@ export function ProfileFeedScreenInner({
_(
msg`There was an an issue updating your feeds, please check your internet connection and try again.`,
),
'xmark',
)
logger.error('Failed up update feeds', {message: err})
}
@ -231,7 +232,7 @@ export function ProfileFeedScreenInner({
])
}
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
Toast.show(_(msg`There was an issue contacting the server`), 'xmark')
logger.error('Failed to toggle pinned feed', {message: e})
}
}, [
@ -543,6 +544,7 @@ function AboutSection({
_(
msg`There was an an issue contacting the server, please check your internet connection and try again.`,
),
'xmark',
)
logger.error('Failed up toggle like', {message: err})
}

View file

@ -300,7 +300,7 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) {
Toast.show(_(msg`Saved to your feeds`))
}
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
Toast.show(_(msg`There was an issue contacting the server`), 'xmark')
logger.error('Failed to toggle pinned feed', {message: e})
}
}, [
@ -319,7 +319,7 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) {
await removeSavedFeed(savedFeedConfig)
Toast.show(_(msg`Removed from your feeds`))
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
Toast.show(_(msg`There was an issue contacting the server`), 'xmark')
logger.error('Failed to remove pinned list', {message: e})
}
}, [playHaptic, removeSavedFeed, _, savedFeedConfig])

View file

@ -234,7 +234,7 @@ function ListItem({
},
])
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
Toast.show(_(msg`There was an issue contacting the server`), 'xmark')
logger.error('Failed to toggle pinned feed', {message: e})
}
}, [_, playHaptic, feed, updateSavedFeeds, resetSaveFeedsMutationState])
@ -260,7 +260,7 @@ function ListItem({
index: nextIndex,
})
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
Toast.show(_(msg`There was an issue contacting the server`), 'xmark')
logger.error('Failed to set pinned feed order', {message: e})
}
}, [feed, isPinned, overwriteSavedFeeds, currentFeeds, _])
@ -286,7 +286,7 @@ function ListItem({
index: nextIndex,
})
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
Toast.show(_(msg`There was an issue contacting the server`), 'xmark')
logger.error('Failed to set pinned feed order', {message: e})
}
}, [feed, isPinned, overwriteSavedFeeds, currentFeeds, _])

View file

@ -43,7 +43,7 @@ export function ExportCarDialog({
}
} catch (e) {
logger.error('Error occurred while downloading CAR file', {message: e})
Toast.show(_(msg`Error occurred while saving file`))
Toast.show(_(msg`Error occurred while saving file`), 'xmark')
} finally {
setLoading(false)
control.close()