mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by samuel.fm

Samuel Newman and committed by
GitHub
27d71229 59bafb42

+134 -95
+4 -1
src/App.native.tsx
··· 95 95 96 96 useEffect(() => { 97 97 return listenSessionDropped(() => { 98 - Toast.show(_(msg`Sorry! Your session expired. Please log in again.`)) 98 + Toast.show( 99 + _(msg`Sorry! Your session expired. Please log in again.`), 100 + 'info', 101 + ) 99 102 }) 100 103 }, [_]) 101 104
+4 -1
src/App.web.tsx
··· 77 77 78 78 useEffect(() => { 79 79 return listenSessionDropped(() => { 80 - Toast.show(_(msg`Sorry! Your session expired. Please log in again.`)) 80 + Toast.show( 81 + _(msg`Sorry! Your session expired. Please log in again.`), 82 + 'info', 83 + ) 81 84 }) 82 85 }, [_]) 83 86
+3 -3
src/components/FeedCard.tsx
··· 264 264 ]) 265 265 } 266 266 Toast.show(_(msg`Feeds updated!`)) 267 - } catch (e: any) { 268 - logger.error(e, {context: `FeedCard: failed to update feeds`, pin}) 269 - Toast.show(_(msg`Failed to update feeds`)) 267 + } catch (err: any) { 268 + logger.error(err, {context: `FeedCard: failed to update feeds`, pin}) 269 + Toast.show(_(msg`Failed to update feeds`), 'xmark') 270 270 } 271 271 }, 272 272 [_, pin, saveFeeds, removeFeed, uri, savedFeedConfig, type],
+6 -6
src/components/ProfileCard.tsx
··· 306 306 )}`, 307 307 ), 308 308 ) 309 - } catch (e: any) { 310 - if (e?.name !== 'AbortError') { 311 - Toast.show(_(msg`An issue occurred, please try again.`)) 309 + } catch (err: any) { 310 + if (err?.name !== 'AbortError') { 311 + Toast.show(_(msg`An issue occurred, please try again.`), 'xmark') 312 312 } 313 313 } 314 314 } ··· 326 326 )}`, 327 327 ), 328 328 ) 329 - } catch (e: any) { 330 - if (e?.name !== 'AbortError') { 331 - Toast.show(_(msg`An issue occurred, please try again.`)) 329 + } catch (err: any) { 330 + if (err?.name !== 'AbortError') { 331 + Toast.show(_(msg`An issue occurred, please try again.`), 'xmark') 332 332 } 333 333 } 334 334 }
+4 -1
src/components/StarterPack/QrCodeDialog.tsx
··· 67 67 try { 68 68 await createAssetAsync(`file://${uri}`) 69 69 } catch (e: unknown) { 70 - Toast.show(_(msg`An error occurred while saving the QR code!`)) 70 + Toast.show( 71 + _(msg`An error occurred while saving the QR code!`), 72 + 'xmark', 73 + ) 71 74 logger.error('Failed to save QR code', {error: e}) 72 75 return 73 76 }
+2 -1
src/components/StarterPack/ShareDialog.tsx
··· 66 66 if (!res) { 67 67 Toast.show( 68 68 _(msg`You must grant access to your photo library to save the image.`), 69 + 'xmark', 69 70 ) 70 71 return 71 72 } ··· 75 76 Toast.show(_(msg`Image saved to your camera roll!`)) 76 77 control.close() 77 78 } catch (e: unknown) { 78 - Toast.show(_(msg`An error occurred while saving the QR code!`)) 79 + Toast.show(_(msg`An error occurred while saving the QR code!`), 'xmark') 79 80 logger.error('Failed to save QR code', {error: e}) 80 81 return 81 82 }
+1
src/components/WhoCanReply.tsx
··· 115 115 _( 116 116 msg`There was an issue. Please check your internet connection and try again.`, 117 117 ), 118 + 'xmark', 118 119 ) 119 120 logger.error('Failed to edit threadgate', {message: err}) 120 121 }
+1 -1
src/components/dms/ConvoMenu.tsx
··· 85 85 } 86 86 }, 87 87 onError: () => { 88 - Toast.show(_(msg`Could not mute chat`)) 88 + Toast.show(_(msg`Could not mute chat`), 'xmark') 89 89 }, 90 90 }) 91 91
+1 -1
src/components/dms/LeaveConvoPrompt.tsx
··· 36 36 } 37 37 }, 38 38 onError: () => { 39 - Toast.show(_(msg`Could not leave chat`)) 39 + Toast.show(_(msg`Could not leave chat`), 'xmark') 40 40 }, 41 41 }) 42 42
+1 -1
src/components/dms/MessageMenu.tsx
··· 54 54 ) 55 55 56 56 Clipboard.setStringAsync(str) 57 - Toast.show(_(msg`Copied to clipboard`)) 57 + Toast.show(_(msg`Copied to clipboard`), 'clipboard-check') 58 58 }, [_, message.text, message.facets]) 59 59 60 60 const onPressTranslateMessage = React.useCallback(() => {
+1 -1
src/components/dms/MessagesNUX.tsx
··· 57 57 const [initialized, setInitialzed] = React.useState(false) 58 58 const {mutate: updateDeclaration} = useUpdateActorDeclaration({ 59 59 onError: () => { 60 - Toast.show(_(msg`Failed to update settings`)) 60 + Toast.show(_(msg`Failed to update settings`), 'xmark') 61 61 }, 62 62 }) 63 63
+3 -1
src/components/dms/dialogs/NewChatDialog.tsx
··· 2 2 import {msg} from '@lingui/macro' 3 3 import {useLingui} from '@lingui/react' 4 4 5 + import {logger} from '#/logger' 5 6 import {useGetConvoForMembers} from '#/state/queries/messages/get-convo-for-members' 6 7 import {logEvent} from 'lib/statsig/statsig' 7 8 import {FAB} from '#/view/com/util/fab/FAB' ··· 31 32 logEvent('chat:open', {logContext: 'NewChatDialog'}) 32 33 }, 33 34 onError: error => { 34 - Toast.show(error.message) 35 + logger.error('Failed to create chat', {safeMessage: error}) 36 + Toast.show(_(msg`An issue occurred starting the chat`), 'xmark') 35 37 }, 36 38 }) 37 39
+6 -1
src/components/dms/dialogs/ShareViaChatDialog.tsx
··· 2 2 import {msg} from '@lingui/macro' 3 3 import {useLingui} from '@lingui/react' 4 4 5 + import {logger} from '#/logger' 5 6 import {useGetConvoForMembers} from '#/state/queries/messages/get-convo-for-members' 6 7 import {logEvent} from 'lib/statsig/statsig' 7 8 import * as Toast from '#/view/com/util/Toast' ··· 43 44 logEvent('chat:open', {logContext: 'SendViaChatDialog'}) 44 45 }, 45 46 onError: error => { 46 - Toast.show(error.message) 47 + logger.error('Failed to share post to chat', {message: error}) 48 + Toast.show( 49 + _(msg`An issue occurred while trying to open the chat`), 50 + 'xmark', 51 + ) 47 52 }, 48 53 }) 49 54
+2 -2
src/components/hooks/useFollowMethods.ts
··· 32 32 } catch (e: any) { 33 33 logger.error(`useFollowMethods: failed to follow`, {message: String(e)}) 34 34 if (e?.name !== 'AbortError') { 35 - Toast.show(_(msg`An issue occurred, please try again.`)) 35 + Toast.show(_(msg`An issue occurred, please try again.`), 'xmark') 36 36 } 37 37 } 38 38 }) ··· 47 47 message: String(e), 48 48 }) 49 49 if (e?.name !== 'AbortError') { 50 - Toast.show(_(msg`An issue occurred, please try again.`)) 50 + Toast.show(_(msg`An issue occurred, please try again.`), 'xmark') 51 51 } 52 52 } 53 53 })
+1 -1
src/components/moderation/LabelsOnMeDialog.tsx
··· 241 241 }, 242 242 onError: err => { 243 243 logger.error('Failed to submit label appeal', {message: err}) 244 - Toast.show(_(msg`Failed to submit appeal, please try again.`)) 244 + Toast.show(_(msg`Failed to submit appeal, please try again.`), 'xmark') 245 245 }, 246 246 onSuccess: () => { 247 247 control.close()
+2 -2
src/lib/media/picker.shared.ts
··· 17 17 }) 18 18 19 19 if (response.assets && response.assets.length > 4) { 20 - Toast.show('You may only select up to 4 images') 20 + Toast.show('You may only select up to 4 images', 'exclamation-circle') 21 21 } 22 22 23 23 return (response.assets ?? []) 24 24 .slice(0, 4) 25 25 .filter(asset => { 26 26 if (asset.mimeType?.startsWith('image/')) return true 27 - Toast.show('Only image files are supported') 27 + Toast.show('Only image files are supported', 'exclamation-circle') 28 28 return false 29 29 }) 30 30 .map(image => ({
+1 -1
src/lib/sharing.ts
··· 20 20 // React Native Share is not supported by web. Web Share API 21 21 // has increasing but not full support, so default to clipboard 22 22 setStringAsync(url) 23 - Toast.show('Copied to clipboard') 23 + Toast.show('Copied to clipboard', 'clipboard-check') 24 24 } 25 25 }
+1 -1
src/screens/Messages/Conversation/ChatDisabled.tsx
··· 84 84 }, 85 85 onError: err => { 86 86 logger.error('Failed to submit chat appeal', {message: err}) 87 - Toast.show(_(msg`Failed to submit appeal, please try again.`)) 87 + Toast.show(_(msg`Failed to submit appeal, please try again.`), 'xmark') 88 88 }, 89 89 onSuccess: () => { 90 90 control.close()
+1 -1
src/screens/Messages/Conversation/MessageInput.tsx
··· 67 67 return 68 68 } 69 69 if (new Graphemer().countGraphemes(message) > MAX_DM_GRAPHEME_LENGTH) { 70 - Toast.show(_(msg`Message is too long`)) 70 + Toast.show(_(msg`Message is too long`), 'xmark') 71 71 return 72 72 } 73 73 clearDraft()
+1 -1
src/screens/Messages/Conversation/MessageInput.web.tsx
··· 46 46 return 47 47 } 48 48 if (new Graphemer().countGraphemes(message) > MAX_DM_GRAPHEME_LENGTH) { 49 - Toast.show(_(msg`Message is too long`)) 49 + Toast.show(_(msg`Message is too long`), 'xmark') 50 50 return 51 51 } 52 52 clearDraft()
+1 -1
src/screens/Messages/Settings.tsx
··· 32 32 33 33 const {mutate: updateDeclaration} = useUpdateActorDeclaration({ 34 34 onError: () => { 35 - Toast.show(_(msg`Failed to update settings`)) 35 + Toast.show(_(msg`Failed to update settings`), 'xmark') 36 36 }, 37 37 }) 38 38
+1
src/screens/Profile/Header/ProfileHeaderLabeler.tsx
··· 116 116 _( 117 117 msg`There was an an issue contacting the server, please check your internet connection and try again.`, 118 118 ), 119 + 'xmark', 119 120 ) 120 121 logger.error(`Failed to toggle labeler like`, {message: e.message}) 121 122 }
+3 -3
src/screens/Profile/Header/ProfileHeaderStandard.tsx
··· 104 104 } catch (e: any) { 105 105 if (e?.name !== 'AbortError') { 106 106 logger.error('Failed to follow', {message: String(e)}) 107 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 107 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 108 108 } 109 109 } 110 110 }) ··· 126 126 } catch (e: any) { 127 127 if (e?.name !== 'AbortError') { 128 128 logger.error('Failed to unfollow', {message: String(e)}) 129 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 129 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 130 130 } 131 131 } 132 132 }) ··· 140 140 } catch (e: any) { 141 141 if (e?.name !== 'AbortError') { 142 142 logger.error('Failed to unblock account', {message: e}) 143 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 143 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 144 144 } 145 145 } 146 146 }, [_, queueUnblock, track])
+2 -2
src/screens/StarterPack/StarterPackScreen.tsx
··· 359 359 captureAction(ProgressGuideAction.Follow, dids.length) 360 360 Toast.show(_(msg`All accounts have been followed!`)) 361 361 } catch (e) { 362 - Toast.show(_(msg`An error occurred while trying to follow all`)) 362 + Toast.show(_(msg`An error occurred while trying to follow all`), 'xmark') 363 363 } finally { 364 364 setIsProcessing(false) 365 365 } ··· 672 672 onError: e => { 673 673 setIsProcessing(false) 674 674 logger.error('Failed to delete invalid starter pack', {safeMessage: e}) 675 - Toast.show(_(msg`Failed to delete starter pack`)) 675 + Toast.show(_(msg`Failed to delete starter pack`), 'xmark') 676 676 }, 677 677 }) 678 678
+5 -2
src/screens/StarterPack/Wizard/State.tsx
··· 74 74 break 75 75 case 'AddProfile': 76 76 if (state.profiles.length >= 51) { 77 - Toast.show(msg`You may only add up to 50 profiles`.message ?? '') 77 + Toast.show( 78 + msg`You may only add up to 50 profiles`.message ?? '', 79 + 'info', 80 + ) 78 81 } else { 79 82 updatedState = {...state, profiles: [...state.profiles, action.profile]} 80 83 } ··· 89 92 break 90 93 case 'AddFeed': 91 94 if (state.feeds.length >= 50) { 92 - Toast.show(msg`You may only add up to 50 feeds`.message ?? '') 95 + Toast.show(msg`You may only add up to 50 feeds`.message ?? '', 'info') 93 96 } else { 94 97 updatedState = {...state, feeds: [...state.feeds, action.feed]} 95 98 }
+2 -2
src/screens/StarterPack/Wizard/index.tsx
··· 227 227 onError: e => { 228 228 logger.error('Failed to create starter pack', {safeMessage: e}) 229 229 dispatch({type: 'SetProcessing', processing: false}) 230 - Toast.show(_(msg`Failed to create starter pack`)) 230 + Toast.show(_(msg`Failed to create starter pack`), 'xmark') 231 231 }, 232 232 }) 233 233 const {mutate: editStarterPack} = useEditStarterPackMutation({ ··· 235 235 onError: e => { 236 236 logger.error('Failed to edit starter pack', {safeMessage: e}) 237 237 dispatch({type: 'SetProcessing', processing: false}) 238 - Toast.show(_(msg`Failed to create starter pack`)) 238 + Toast.show(_(msg`Failed to create starter pack`), 'xmark') 239 239 }, 240 240 }) 241 241
+1 -1
src/view/com/composer/videos/state.ts
··· 24 24 onError: (e: any) => { 25 25 // Don't log these errors in sentry, just let the user know 26 26 if (e instanceof VideoTooLargeError) { 27 - Toast.show(_(msg`Videos cannot be larger than 100MB`)) 27 + Toast.show(_(msg`Videos cannot be larger than 100MB`), 'xmark') 28 28 return 29 29 } 30 30 logger.error('Failed to compress video', {safeError: e})
+2 -2
src/view/com/feeds/FeedSourceCard.tsx
··· 125 125 ]) 126 126 Toast.show(_(msg`Added to my feeds`)) 127 127 } catch (e) { 128 - Toast.show(_(msg`There was an issue contacting your server`)) 128 + Toast.show(_(msg`There was an issue contacting your server`), 'xmark') 129 129 logger.error('Failed to save feed', {message: e}) 130 130 } 131 131 }, [_, feed, pinOnSave, addSavedFeeds, isSaved]) ··· 138 138 // await item.unsave() 139 139 Toast.show(_(msg`Removed from my feeds`)) 140 140 } catch (e) { 141 - Toast.show(_(msg`There was an issue contacting your server`)) 141 + Toast.show(_(msg`There was an issue contacting your server`), 'xmark') 142 142 logger.error('Failed to unsave feed', {message: e}) 143 143 } 144 144 }, [_, removeFeed, savedFeedConfig])
+6 -2
src/view/com/lightbox/Lightbox.tsx
··· 66 66 const saveImageToAlbumWithToasts = React.useCallback( 67 67 async (uri: string) => { 68 68 if (!permissionResponse || permissionResponse.granted === false) { 69 - Toast.show(_(msg`Permission to access camera roll is required.`)) 69 + Toast.show( 70 + _(msg`Permission to access camera roll is required.`), 71 + 'info', 72 + ) 70 73 if (permissionResponse?.canAskAgain) { 71 74 requestPermission() 72 75 } else { ··· 74 77 _( 75 78 msg`Permission to access camera roll was denied. Please enable it in your system settings.`, 76 79 ), 80 + 'xmark', 77 81 ) 78 82 } 79 83 return ··· 83 87 await saveImageToMediaLibrary({uri}) 84 88 Toast.show(_(msg`Saved to your camera roll`)) 85 89 } catch (e: any) { 86 - Toast.show(_(msg`Failed to save image: ${String(e)}`)) 90 + Toast.show(_(msg`Failed to save image: ${String(e)}`), 'xmark') 87 91 } 88 92 }, 89 93 [permissionResponse, requestPermission, _],
+7 -6
src/view/com/modals/AddAppPasswords.tsx
··· 77 77 const onCopy = React.useCallback(() => { 78 78 if (appPassword) { 79 79 setStringAsync(appPassword) 80 - Toast.show(_(msg`Copied to clipboard`)) 80 + Toast.show(_(msg`Copied to clipboard`), 'clipboard-check') 81 81 setWasCopied(true) 82 82 } 83 83 }, [appPassword, _]) ··· 93 93 _( 94 94 msg`Please enter a name for your app password. All spaces is not allowed.`, 95 95 ), 96 - 'times', 96 + 'xmark', 97 97 ) 98 98 return 99 99 } ··· 101 101 if (name.length < 4) { 102 102 Toast.show( 103 103 _(msg`App Password names must be at least 4 characters long.`), 104 - 'times', 104 + 'xmark', 105 105 ) 106 106 return 107 107 } 108 108 109 109 if (passwords?.find(p => p.name === name)) { 110 - Toast.show(_(msg`This name is already in use`), 'times') 110 + Toast.show(_(msg`This name is already in use`), 'xmark') 111 111 return 112 112 } 113 113 ··· 116 116 if (newPassword) { 117 117 setAppPassword(newPassword.password) 118 118 } else { 119 - Toast.show(_(msg`Failed to create app password.`), 'times') 119 + Toast.show(_(msg`Failed to create app password.`), 'xmark') 120 120 // TODO: better error handling (?) 121 121 } 122 122 } catch (e) { 123 - Toast.show(_(msg`Failed to create app password.`), 'times') 123 + Toast.show(_(msg`Failed to create app password.`), 'xmark') 124 124 logger.error('Failed to create app password', {message: e}) 125 125 } 126 126 } ··· 137 137 _( 138 138 msg`App Password names can only contain letters, numbers, spaces, dashes, and underscores.`, 139 139 ), 140 + 'xmark', 140 141 ) 141 142 } 142 143 }
+1 -1
src/view/com/modals/ChangeHandle.tsx
··· 317 317 // = 318 318 const onPressCopy = React.useCallback(() => { 319 319 setStringAsync(isDNSForm ? `did=${currentAccount.did}` : currentAccount.did) 320 - Toast.show(_(msg`Copied to clipboard`)) 320 + Toast.show(_(msg`Copied to clipboard`), 'clipboard-check') 321 321 }, [currentAccount, isDNSForm, _]) 322 322 const onChangeHandle = React.useCallback( 323 323 (v: string) => {
+1 -1
src/view/com/modals/InviteCodes.tsx
··· 150 150 151 151 const onPress = React.useCallback(() => { 152 152 setStringAsync(invite.code) 153 - Toast.show(_(msg`Copied to clipboard`)) 153 + Toast.show(_(msg`Copied to clipboard`), 'clipboard-check') 154 154 setInviteCopied(invite.code) 155 155 }, [setInviteCopied, invite, _]) 156 156
+19 -18
src/view/com/modals/ListAddRemoveUsers.tsx
··· 7 7 View, 8 8 } from 'react-native' 9 9 import {AppBskyActorDefs, AppBskyGraphDefs} from '@atproto/api' 10 - import {ScrollView, TextInput} from './util' 11 10 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' 12 - import {Text} from '../util/text/Text' 13 - import {Button} from '../util/forms/Button' 14 - import {UserAvatar} from '../util/UserAvatar' 15 - import * as Toast from '../util/Toast' 16 - import {s, colors} from 'lib/styles' 17 - import {usePalette} from 'lib/hooks/usePalette' 18 - import {isWeb} from 'platform/detection' 19 - import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' 20 - import {useIsKeyboardVisible} from 'lib/hooks/useIsKeyboardVisible' 21 - import {cleanError} from 'lib/strings/errors' 22 - import {sanitizeDisplayName} from 'lib/strings/display-names' 23 - import {sanitizeHandle} from 'lib/strings/handles' 11 + import {msg, Trans} from '@lingui/macro' 12 + import {useLingui} from '@lingui/react' 13 + 24 14 import {HITSLOP_20} from '#/lib/constants' 25 - import {Trans, msg} from '@lingui/macro' 26 - import {useLingui} from '@lingui/react' 27 15 import {useModalControls} from '#/state/modals' 16 + import {useActorAutocompleteQuery} from '#/state/queries/actor-autocomplete' 28 17 import { 29 - useDangerousListMembershipsQuery, 30 18 getMembership, 31 19 ListMembersip, 20 + useDangerousListMembershipsQuery, 32 21 useListMembershipAddMutation, 33 22 useListMembershipRemoveMutation, 34 23 } from '#/state/queries/list-memberships' 35 - import {useActorAutocompleteQuery} from '#/state/queries/actor-autocomplete' 24 + import {useIsKeyboardVisible} from 'lib/hooks/useIsKeyboardVisible' 25 + import {usePalette} from 'lib/hooks/usePalette' 26 + import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' 27 + import {sanitizeDisplayName} from 'lib/strings/display-names' 28 + import {cleanError} from 'lib/strings/errors' 29 + import {sanitizeHandle} from 'lib/strings/handles' 30 + import {colors, s} from 'lib/styles' 31 + import {isWeb} from 'platform/detection' 32 + import {Button} from '../util/forms/Button' 33 + import {Text} from '../util/text/Text' 34 + import * as Toast from '../util/Toast' 35 + import {UserAvatar} from '../util/UserAvatar' 36 + import {ScrollView, TextInput} from './util' 36 37 37 38 export const snapPoints = ['90%'] 38 39 ··· 200 201 onChange?.('remove', profile) 201 202 } 202 203 } catch (e) { 203 - Toast.show(cleanError(e)) 204 + Toast.show(cleanError(e), 'xmark') 204 205 } finally { 205 206 setIsProcessing(false) 206 207 }
+1 -1
src/view/com/modals/UserAddRemoveLists.tsx
··· 166 166 onRemove?.(list.uri) 167 167 } 168 168 } catch (e) { 169 - Toast.show(cleanError(e)) 169 + Toast.show(cleanError(e), 'xmark') 170 170 } finally { 171 171 setIsProcessing(false) 172 172 }
+2 -2
src/view/com/post-thread/PostThreadFollowBtn.tsx
··· 96 96 } catch (e: any) { 97 97 if (e?.name !== 'AbortError') { 98 98 logger.error('Failed to follow', {message: String(e)}) 99 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 99 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 100 100 } 101 101 } 102 102 }) ··· 108 108 } catch (e: any) { 109 109 if (e?.name !== 'AbortError') { 110 110 logger.error('Failed to unfollow', {message: String(e)}) 111 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 111 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 112 112 } 113 113 } 114 114 })
+1
src/view/com/posts/FeedErrorMessage.tsx
··· 144 144 _l( 145 145 msgLingui`There was an an issue removing this feed. Please check your internet connection and try again.`, 146 146 ), 147 + 'exclamation-circle', 147 148 ) 148 149 logger.error('Failed to remove feed', {message: err}) 149 150 }
+2
src/view/com/posts/FeedShutdownMsg.tsx
··· 51 51 _( 52 52 msg`There was an an issue updating your feeds, please check your internet connection and try again.`, 53 53 ), 54 + 'exclamation-circle', 54 55 ) 55 56 logger.error('Failed up update feeds', {message: err}) 56 57 } ··· 69 70 _( 70 71 msg`There was an an issue updating your feeds, please check your internet connection and try again.`, 71 72 ), 73 + 'exclamation-circle', 72 74 ) 73 75 logger.error('Failed up update feeds', {message: err}) 74 76 }
+2 -2
src/view/com/profile/FollowButton.tsx
··· 33 33 await queueFollow() 34 34 } catch (e: any) { 35 35 if (e?.name !== 'AbortError') { 36 - Toast.show(_(msg`An issue occurred, please try again.`)) 36 + Toast.show(_(msg`An issue occurred, please try again.`), 'xmark') 37 37 } 38 38 } 39 39 } ··· 43 43 await queueUnfollow() 44 44 } catch (e: any) { 45 45 if (e?.name !== 'AbortError') { 46 - Toast.show(_(msg`An issue occurred, please try again.`)) 46 + Toast.show(_(msg`An issue occurred, please try again.`), 'xmark') 47 47 } 48 48 } 49 49 }
+2 -2
src/view/com/profile/ProfileHeaderSuggestedFollows.tsx
··· 185 185 await queueFollow() 186 186 } catch (e: any) { 187 187 if (e?.name !== 'AbortError') { 188 - Toast.show(_(msg`An issue occurred, please try again.`)) 188 + Toast.show(_(msg`An issue occurred, please try again.`), 'xmark') 189 189 } 190 190 } 191 191 }, [queueFollow, track, _]) ··· 195 195 await queueUnfollow() 196 196 } catch (e: any) { 197 197 if (e?.name !== 'AbortError') { 198 - Toast.show(_(msg`An issue occurred, please try again.`)) 198 + Toast.show(_(msg`An issue occurred, please try again.`), 'xmark') 199 199 } 200 200 } 201 201 }, [queueUnfollow, _])
+6 -6
src/view/com/profile/ProfileMenu.tsx
··· 108 108 } catch (e: any) { 109 109 if (e?.name !== 'AbortError') { 110 110 logger.error('Failed to unmute account', {message: e}) 111 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 111 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 112 112 } 113 113 } 114 114 } else { ··· 119 119 } catch (e: any) { 120 120 if (e?.name !== 'AbortError') { 121 121 logger.error('Failed to mute account', {message: e}) 122 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 122 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 123 123 } 124 124 } 125 125 } ··· 134 134 } catch (e: any) { 135 135 if (e?.name !== 'AbortError') { 136 136 logger.error('Failed to unblock account', {message: e}) 137 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 137 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 138 138 } 139 139 } 140 140 } else { ··· 145 145 } catch (e: any) { 146 146 if (e?.name !== 'AbortError') { 147 147 logger.error('Failed to block account', {message: e}) 148 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 148 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 149 149 } 150 150 } 151 151 } ··· 159 159 } catch (e: any) { 160 160 if (e?.name !== 'AbortError') { 161 161 logger.error('Failed to follow account', {message: e}) 162 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 162 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 163 163 } 164 164 } 165 165 }, [_, queueFollow, track]) ··· 172 172 } catch (e: any) { 173 173 if (e?.name !== 'AbortError') { 174 174 logger.error('Failed to unfollow account', {message: e}) 175 - Toast.show(_(msg`There was an issue! ${e.toString()}`)) 175 + Toast.show(_(msg`There was an issue! ${e.toString()}`), 'xmark') 176 176 } 177 177 } 178 178 }, [_, queueUnfollow, track])
+3 -2
src/view/com/util/Toast.web.tsx
··· 2 2 * Note: the dataSet properties are used to leverage custom CSS in public/index.html 3 3 */ 4 4 5 - import React, {useState, useEffect} from 'react' 5 + import React, {useEffect, useState} from 'react' 6 6 import {StyleSheet, Text, View} from 'react-native' 7 7 import { 8 8 FontAwesomeIcon, ··· 39 39 <View style={styles.container}> 40 40 <FontAwesomeIcon 41 41 icon={activeToast.icon} 42 - size={24} 42 + size={20} 43 43 style={styles.icon as FontAwesomeIconStyle} 44 44 /> 45 45 <Text style={styles.text}>{activeToast.text}</Text> ··· 79 79 }, 80 80 icon: { 81 81 color: '#fff', 82 + flexShrink: 0, 82 83 }, 83 84 text: { 84 85 color: '#fff',
+6 -3
src/view/com/util/forms/PostDropdownBtn.tsx
··· 149 149 }, 150 150 e => { 151 151 logger.error('Failed to delete post', {message: e}) 152 - Toast.show(_(msg`Failed to delete post, please try again`)) 152 + Toast.show(_(msg`Failed to delete post, please try again`), 'xmark') 153 153 }, 154 154 ) 155 155 }, [ ··· 177 177 } catch (e: any) { 178 178 if (e?.name !== 'AbortError') { 179 179 logger.error('Failed to toggle thread mute', {message: e}) 180 - Toast.show(_(msg`Failed to toggle thread mute, please try again`)) 180 + Toast.show( 181 + _(msg`Failed to toggle thread mute, please try again`), 182 + 'xmark', 183 + ) 181 184 } 182 185 } 183 186 }, [isThreadMuted, unmuteThread, _, muteThread]) ··· 186 189 const str = richTextToString(richText, true) 187 190 188 191 Clipboard.setStringAsync(str) 189 - Toast.show(_(msg`Copied to clipboard`)) 192 + Toast.show(_(msg`Copied to clipboard`), 'clipboard-check') 190 193 }, [_, richText]) 191 194 192 195 const onPressTranslate = React.useCallback(() => {
+1 -1
src/view/com/util/post-ctrls/PostCtrls.tsx
··· 354 354 onPress={e => { 355 355 e.stopPropagation() 356 356 Clipboard.setStringAsync(feedContext) 357 - Toast.show(_(msg`Copied to clipboard`)) 357 + Toast.show(_(msg`Copied to clipboard`), 'clipboard-check') 358 358 }}> 359 359 <Text 360 360 style={{
+2
src/view/icons/index.tsx
··· 51 51 import {faCircleCheck} from '@fortawesome/free-solid-svg-icons/faCircleCheck' 52 52 import {faCircleDot} from '@fortawesome/free-solid-svg-icons/faCircleDot' 53 53 import {faCircleExclamation} from '@fortawesome/free-solid-svg-icons/faCircleExclamation' 54 + import {faClipboardCheck} from '@fortawesome/free-solid-svg-icons/faClipboardCheck' 54 55 import {faClone} from '@fortawesome/free-solid-svg-icons/faClone' 55 56 import {faCommentSlash} from '@fortawesome/free-solid-svg-icons/faCommentSlash' 56 57 import {faDownload} from '@fortawesome/free-solid-svg-icons/faDownload' ··· 140 141 faCircleExclamation, 141 142 faCirclePlay, 142 143 faCircleUser, 144 + faClipboardCheck, 143 145 faClone, 144 146 farClone, 145 147 faComment,
+3 -1
src/view/screens/ProfileFeed.tsx
··· 205 205 _( 206 206 msg`There was an an issue updating your feeds, please check your internet connection and try again.`, 207 207 ), 208 + 'xmark', 208 209 ) 209 210 logger.error('Failed up update feeds', {message: err}) 210 211 } ··· 231 232 ]) 232 233 } 233 234 } catch (e) { 234 - Toast.show(_(msg`There was an issue contacting the server`)) 235 + Toast.show(_(msg`There was an issue contacting the server`), 'xmark') 235 236 logger.error('Failed to toggle pinned feed', {message: e}) 236 237 } 237 238 }, [ ··· 543 544 _( 544 545 msg`There was an an issue contacting the server, please check your internet connection and try again.`, 545 546 ), 547 + 'xmark', 546 548 ) 547 549 logger.error('Failed up toggle like', {message: err}) 548 550 }
+2 -2
src/view/screens/ProfileList.tsx
··· 300 300 Toast.show(_(msg`Saved to your feeds`)) 301 301 } 302 302 } catch (e) { 303 - Toast.show(_(msg`There was an issue contacting the server`)) 303 + Toast.show(_(msg`There was an issue contacting the server`), 'xmark') 304 304 logger.error('Failed to toggle pinned feed', {message: e}) 305 305 } 306 306 }, [ ··· 319 319 await removeSavedFeed(savedFeedConfig) 320 320 Toast.show(_(msg`Removed from your feeds`)) 321 321 } catch (e) { 322 - Toast.show(_(msg`There was an issue contacting the server`)) 322 + Toast.show(_(msg`There was an issue contacting the server`), 'xmark') 323 323 logger.error('Failed to remove pinned list', {message: e}) 324 324 } 325 325 }, [playHaptic, removeSavedFeed, _, savedFeedConfig])
+3 -3
src/view/screens/SavedFeeds.tsx
··· 234 234 }, 235 235 ]) 236 236 } catch (e) { 237 - Toast.show(_(msg`There was an issue contacting the server`)) 237 + Toast.show(_(msg`There was an issue contacting the server`), 'xmark') 238 238 logger.error('Failed to toggle pinned feed', {message: e}) 239 239 } 240 240 }, [_, playHaptic, feed, updateSavedFeeds, resetSaveFeedsMutationState]) ··· 260 260 index: nextIndex, 261 261 }) 262 262 } catch (e) { 263 - Toast.show(_(msg`There was an issue contacting the server`)) 263 + Toast.show(_(msg`There was an issue contacting the server`), 'xmark') 264 264 logger.error('Failed to set pinned feed order', {message: e}) 265 265 } 266 266 }, [feed, isPinned, overwriteSavedFeeds, currentFeeds, _]) ··· 286 286 index: nextIndex, 287 287 }) 288 288 } catch (e) { 289 - Toast.show(_(msg`There was an issue contacting the server`)) 289 + Toast.show(_(msg`There was an issue contacting the server`), 'xmark') 290 290 logger.error('Failed to set pinned feed order', {message: e}) 291 291 } 292 292 }, [feed, isPinned, overwriteSavedFeeds, currentFeeds, _])
+1 -1
src/view/screens/Settings/ExportCarDialog.tsx
··· 43 43 } 44 44 } catch (e) { 45 45 logger.error('Error occurred while downloading CAR file', {message: e}) 46 - Toast.show(_(msg`Error occurred while saving file`)) 46 + Toast.show(_(msg`Error occurred while saving file`), 'xmark') 47 47 } finally { 48 48 setLoading(false) 49 49 control.close()