mirror of
				https://github.com/tooot-app/app
				synced 2025-06-05 22:19:13 +02:00 
			
		
		
		
	Warn image processing error
This commit is contained in:
		| @@ -878,7 +878,7 @@ EXTERNAL SOURCES: | ||||
| SPEC CHECKSUMS: | ||||
|   ASN1Decoder: 6110fdeacfdb41559b1481457a1645be716610aa | ||||
|   boost: a7c83b31436843459a1961bfd74b96033dc77234 | ||||
|   DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 | ||||
|   DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 | ||||
|   EASClient: 93565f4d024559b75eac62bc7d50acaa354614f6 | ||||
|   EXApplication: d6562af1204162e0ac46d341a7d4e5dc720b33de | ||||
|   EXAV: 88f61c5af8415715b7ee51f084c1020235b85c56 | ||||
| @@ -919,7 +919,7 @@ SPEC CHECKSUMS: | ||||
|   FirebaseCoreDiagnostics: 92e07a649aeb66352b319d43bdd2ee3942af84cb | ||||
|   FirebaseInstallations: 40bd9054049b2eae9a2c38ef1c3dd213df3605cd | ||||
|   fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 | ||||
|   glog: 476ee3e89abb49e07f822b48323c51c57124b572 | ||||
|   glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a | ||||
|   GoogleAppMeasurement: 71156240babd3cc6ced03e0d54816f01a880c730 | ||||
|   GoogleDataTransport: 5fffe35792f8b96ec8d6775f5eccd83c998d5a3b | ||||
|   GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1 | ||||
| @@ -928,7 +928,7 @@ SPEC CHECKSUMS: | ||||
|   libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc | ||||
|   nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 | ||||
|   PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb | ||||
|   RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8 | ||||
|   RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a | ||||
|   RCTRequired: 3e917ea5377751094f38145fdece525aa90545a0 | ||||
|   RCTTypeSafety: c43c072a4bd60feb49a9570b0517892b4305c45e | ||||
|   React: 176dd882de001854ced260fad41bb68a31aa4bd0 | ||||
|   | ||||
| @@ -80,7 +80,7 @@ const displayMessage = ({ | ||||
|     }) | ||||
|   } else { | ||||
|     showMessage({ | ||||
|       duration: type === 'error' ? 3500 : duration === 'short' ? 1500 : 2500, | ||||
|       duration: type === 'error' ? 8000 : duration === 'short' ? 3000 : 5000, | ||||
|       autoHide, | ||||
|       message, | ||||
|       description, | ||||
| @@ -124,7 +124,8 @@ const Message = React.forwardRef<FlashMessage>((_, ref) => { | ||||
|         shadowColor: colors.primaryDefault, | ||||
|         shadowOffset: { width: 0, height: 0 }, | ||||
|         shadowOpacity: theme === 'light' ? 0.16 : 0.24, | ||||
|         shadowRadius: 4 | ||||
|         shadowRadius: 4, | ||||
|         paddingRight: StyleConstants.Spacing.M * 2 | ||||
|       }} | ||||
|       titleStyle={{ | ||||
|         color: colors.primaryDefault, | ||||
|   | ||||
| @@ -147,7 +147,8 @@ | ||||
|         "group": "Group {{index}}", | ||||
|         "label": "Label", | ||||
|         "content": "Content" | ||||
|       } | ||||
|       }, | ||||
|       "mediaSelectionFailed": "Image processing failed. Please try again." | ||||
|     }, | ||||
|     "push": { | ||||
|       "notAvailable": "Your phone does not support tooot's push notification", | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| import mediaSelector from '@components/mediaSelector' | ||||
| import { MenuRow } from '@components/Menu' | ||||
| import { displayMessage } from '@components/Message' | ||||
| import { useActionSheet } from '@expo/react-native-action-sheet' | ||||
| import { useProfileMutation, useProfileQuery } from '@utils/queryHooks/profile' | ||||
| import { useTheme } from '@utils/styles/ThemeManager' | ||||
| @@ -37,6 +38,15 @@ const ProfileAvatarHeader: React.FC<Props> = ({ type, messageRef }) => { | ||||
|               ? { width: 400, height: 400 } | ||||
|               : { width: 1500, height: 500 } | ||||
|         }) | ||||
|         if (!image[0].uri) { | ||||
|           displayMessage({ | ||||
|             ref: messageRef, | ||||
|             message: t('screenTabs:me.profile.mediaSelectionFailed'), | ||||
|             theme: theme, | ||||
|             type: 'error' | ||||
|           }) | ||||
|           return | ||||
|         } | ||||
|         mutation.mutate({ | ||||
|           theme, | ||||
|           messageRef, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user