From 869524eb844a9d773a8a08cf184c037c39f79770 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 21 Jun 2022 23:05:29 +0200 Subject: [PATCH 1/6] Fix uploading avatar --- package.json | 2 +- src/components/mediaSelector.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8db32a53..cbe49a09 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "native": "220603", "major": 4, "minor": 1, - "patch": 4, + "patch": 5, "expo": "45.0.0" }, "description": "tooot app for Mastodon", diff --git a/src/components/mediaSelector.ts b/src/components/mediaSelector.ts index 4d18cb78..313bcef2 100644 --- a/src/components/mediaSelector.ts +++ b/src/components/mediaSelector.ts @@ -150,7 +150,7 @@ const mediaSelector = async ({ for (const image of images) { const croppedImage = await ImagePicker.openCropper({ mediaType: 'photo', - path: image.path, + path: image.sourceURL || image.path, width: resize.width, height: resize.height, cropperChooseText: i18next.t('common:buttons.apply'), From ca810065f8f06153a047b082f50109a7084a0eb1 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 21 Jun 2022 23:10:40 +0200 Subject: [PATCH 2/6] Force clearing push count --- src/utils/push/useConnect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/push/useConnect.ts b/src/utils/push/useConnect.ts index e89b8610..3d8ad47f 100644 --- a/src/utils/push/useConnect.ts +++ b/src/utils/push/useConnect.ts @@ -94,8 +94,8 @@ const pushUseConnect = ({ t, instances }: Params) => { }, [expoToken, pushEnabled.length]) return useEffect(() => { + Notifications.setBadgeCountAsync(0) if (expoToken && pushEnabled.length) { - Notifications.setBadgeCountAsync(0) connect() } }, [expoToken, pushEnabled.length]) From 41d85bf738d2a93e2e5d15ac008eeb2daa103056 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 21 Jun 2022 23:31:31 +0200 Subject: [PATCH 3/6] Fix row flexbox --- src/components/Menu/Row.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/components/Menu/Row.tsx b/src/components/Menu/Row.tsx index 56919332..d6097f0d 100644 --- a/src/components/Menu/Row.tsx +++ b/src/components/Menu/Row.tsx @@ -87,7 +87,7 @@ const MenuRow: React.FC = ({ > = ({ }} /> ) : null} - - - {title} - - + + {title} + {content || switchValue !== undefined || iconBack ? ( From 29977b6c9e33baffb3cdca274729bf3394a78450 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 21 Jun 2022 23:45:11 +0200 Subject: [PATCH 4/6] Fixed #347 --- src/utils/queryHooks/profile.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/utils/queryHooks/profile.ts b/src/utils/queryHooks/profile.ts index d68b7966..5158d9ce 100644 --- a/src/utils/queryHooks/profile.ts +++ b/src/utils/queryHooks/profile.ts @@ -64,14 +64,18 @@ type MutationVarsProfile = MutationVarsProfileBase & { const mutationFunction = async ({ type, data }: MutationVarsProfile) => { const formData = new FormData() if (type === 'fields_attributes') { - const tempData = data as { name: string; value: string }[] - tempData.forEach((d, index) => { - formData.append(`fields_attributes[${index}][name]`, d.name) - formData.append(`fields_attributes[${index}][value]`, d.value) - }) + if (!data.length) { + formData.append('fields_attributes[]', '') + } else { + const tempData = data as { name: string; value: string }[] + tempData.forEach((d, index) => { + formData.append(`fields_attributes[${index}][name]`, d.name) + formData.append(`fields_attributes[${index}][value]`, d.value) + }) + } } else if (type === 'avatar' || type === 'header') { formData.append(type, { - uri: `file://${data}`, + uri: data, name: 'image/jpeg', type: 'image/jpeg' } as any) From 0f8befc89ca7b6a0d44e355a72df9f92f8f76038 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 21 Jun 2022 23:50:49 +0200 Subject: [PATCH 5/6] Fixed #348 --- src/screens/Tabs/Shared/Account/Header.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/screens/Tabs/Shared/Account/Header.tsx b/src/screens/Tabs/Shared/Account/Header.tsx index 6b33bf73..5a4d9a6e 100644 --- a/src/screens/Tabs/Shared/Account/Header.tsx +++ b/src/screens/Tabs/Shared/Account/Header.tsx @@ -1,9 +1,8 @@ import Button from '@components/Button' -import { useAccessibility } from '@utils/accessibility/AccessibilityManager' +import GracefullyImage from '@components/GracefullyImage' import { useTheme } from '@utils/styles/ThemeManager' import React from 'react' import { Dimensions, View } from 'react-native' -import FastImage from 'react-native-fast-image' import { useSafeAreaInsets } from 'react-native-safe-area-context' export interface Props { @@ -13,16 +12,13 @@ export interface Props { const AccountHeader = React.memo( ({ account, edit }: Props) => { - const { reduceMotionEnabled } = useAccessibility() const { colors } = useTheme() const topInset = useSafeAreaInsets().top return ( - Date: Tue, 21 Jun 2022 23:56:45 +0200 Subject: [PATCH 6/6] New Crowdin updates (#346) * New translations instance.json (Italian) * New translations timeline.json (Italian) * New translations mediaSelector.json (Italian) * New translations actions.json (Italian) * New translations compose.json (Italian) * New translations tabs.json (Italian) * New translations contextMenu.json (Italian) * New translations mediaSelector.json (Italian) * New translations contextMenu.json (Italian) --- src/i18n/it/components/contextMenu.json | 28 +++++++++++------------ src/i18n/it/components/instance.json | 2 +- src/i18n/it/components/mediaSelector.json | 8 +++---- src/i18n/it/components/timeline.json | 2 +- src/i18n/it/screens/actions.json | 6 ++--- src/i18n/it/screens/compose.json | 2 +- src/i18n/it/screens/tabs.json | 4 ++-- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/i18n/it/components/contextMenu.json b/src/i18n/it/components/contextMenu.json index 3f5dff19..6b86a431 100644 --- a/src/i18n/it/components/contextMenu.json +++ b/src/i18n/it/components/contextMenu.json @@ -1,25 +1,25 @@ { "accessibilityHint": "Azioni per questo toot, per l'utente che l'ha pubblicato o per il toot stesso", "account": { - "title": "", + "title": "Azioni utente", "mute": { "action_false": "Muta utente", - "action_true": "" + "action_true": "Riattiva utente" }, "block": { "action_false": "Blocca utente", - "action_true": "" + "action_true": "Sblocca utente" }, "reports": { "action": "Segnala utente" } }, "instance": { - "title": "", + "title": "Azione sull'istanza", "block": { "action": "Blocca istanza {{instance}}", "alert": { - "title": "", + "title": "Confermi di voler bloccare l'istanza {{instance}}?", "message": "Sarebbe meglio mutare o bloccare singoli utenti.\n\nSe blocchi un'istanza, tutti i suoi contenuti a te relativi, inclusi tutti i tuoi seguaci da questa, saranno rimossi.", "buttons": { "confirm": "Ho capito" @@ -36,7 +36,7 @@ } }, "status": { - "title": "", + "title": "Azioni sul toot", "edit": { "action": "Modifica toot" }, @@ -44,29 +44,29 @@ "action": "Cancella toot", "alert": { "title": "Conferma?", - "message": "", + "message": "Tutti i retoot, gli apprezzamenti, e le risposte, saranno cancellati.", "buttons": { "confirm": "Ho capito" } } }, "deleteEdit": { - "action": "", + "action": "Cancella e ripubblica toot", "alert": { - "title": "", - "message": "", + "title": "Confermi cancellazione e ripubblicazione?", + "message": "Tutti i retoot, gli apprezzamenti, e le risposte, saranno cancellati.", "buttons": { "confirm": "Ho capito" } } }, "mute": { - "action_false": "", - "action_true": "" + "action_false": "Muta toot e le sue risposte", + "action_true": "Riattiva toot e le sue risposte" }, "pin": { - "action_false": "", - "action_true": "" + "action_false": "Fissa toot", + "action_true": "Togli toot all'alto" } } } \ No newline at end of file diff --git a/src/i18n/it/components/instance.json b/src/i18n/it/components/instance.json index 59fd2652..1e47895b 100644 --- a/src/i18n/it/components/instance.json +++ b/src/i18n/it/components/instance.json @@ -14,7 +14,7 @@ "base": "Per accedere, verrà aperta una pagina del browser di sistema. I dati di accesso del tuo account sono protetti." }, "terms": { - "base": "" + "base": "Accedendo, accetti la <0>politica sulla privacy e i <1>termini di servizio." } }, "update": { diff --git a/src/i18n/it/components/mediaSelector.json b/src/i18n/it/components/mediaSelector.json index 57535ef6..3816ac31 100644 --- a/src/i18n/it/components/mediaSelector.json +++ b/src/i18n/it/components/mediaSelector.json @@ -1,10 +1,10 @@ { "title": "Seleziona origine media", "options": { - "image": "", - "image_max": "", - "video": "", - "video_max": "" + "image": "Carica foto", + "image_max": "Carica foto (massimo {{max}})", + "video": "Carica video", + "video_max": "Carica video (max {{max}})" }, "library": { "alert": { diff --git a/src/i18n/it/components/timeline.json b/src/i18n/it/components/timeline.json index d1b29919..55a85ff5 100644 --- a/src/i18n/it/components/timeline.json +++ b/src/i18n/it/components/timeline.json @@ -30,7 +30,7 @@ "default": "{{name}} ha ricondiviso", "notification": "{{name}} ha ricondiviso il tuo toot" }, - "update": "" + "update": "Retoot ha subito una modifica" }, "actions": { "reply": { diff --git a/src/i18n/it/screens/actions.json b/src/i18n/it/screens/actions.json index 349dff8a..f6914024 100644 --- a/src/i18n/it/screens/actions.json +++ b/src/i18n/it/screens/actions.json @@ -1,7 +1,7 @@ { "content": { "altText": { - "heading": "" + "heading": "Testo descrittivo" }, "notificationsFilter": { "heading": "Filtra notifiche per tipo", @@ -12,8 +12,8 @@ "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "status": "", - "update": "" + "status": "Toot da utenti seguiti", + "update": "Retoot ha subito una modifica" } } } diff --git a/src/i18n/it/screens/compose.json b/src/i18n/it/screens/compose.json index 190db708..095ef96c 100644 --- a/src/i18n/it/screens/compose.json +++ b/src/i18n/it/screens/compose.json @@ -168,7 +168,7 @@ "header": { "title": "Bozza" }, - "warning": "", + "warning": "Le bozze sono salvate solo in locale, e potrebbero essere perse in seguito a problemi. Evita di usarle per archiviazione a lungo termine.", "content": { "accessibilityHint": "Bozza salvata, premi per modificarla", "textEmpty": "Testo vuoto" diff --git a/src/i18n/it/screens/tabs.json b/src/i18n/it/screens/tabs.json index f706112e..02414793 100644 --- a/src/i18n/it/screens/tabs.json +++ b/src/i18n/it/screens/tabs.json @@ -170,7 +170,7 @@ "heading": "Nuovi seguaci" }, "follow_request": { - "heading": "" + "heading": "Richiesta di seguirti" }, "favourite": { "heading": "Apprezzamenti" @@ -185,7 +185,7 @@ "heading": "Novità sui sondaggi" }, "status": { - "heading": "" + "heading": "Toot da utenti seguiti" }, "howitworks": "Scopri come funziona il traversamento dei messaggi" },