show an error if force fetching feeds is not yet available

This commit is contained in:
Athou
2024-09-21 10:31:17 +02:00
parent 19c8db8b31
commit 6a7d83bb45
29 changed files with 128 additions and 8 deletions

View File

@@ -132,16 +132,24 @@ export function ProfileMenu(props: ProfileMenuProps) {
onClick={async () => {
setOpened(false)
await client.feed.refreshAll()
try {
await client.feed.refreshAll()
// reload profile to update last force refresh timestamp
await dispatch(reloadProfile())
// reload profile to update last force refresh timestamp
await dispatch(reloadProfile())
showNotification({
message: <Trans>Your feeds have been queued for refresh.</Trans>,
color: "green",
autoClose: 1000,
})
showNotification({
message: <Trans>Your feeds have been queued for refresh.</Trans>,
color: "green",
autoClose: 1000,
})
} catch (error) {
showNotification({
message: <Trans>Force fetching feeds is not yet available.</Trans>,
color: "red",
autoClose: 2000,
})
}
}}
>
<Trans>Fetch all my feeds now</Trans>