Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #374 from tooot-app/main
Browse files Browse the repository at this point in the history
Test v4.3
  • Loading branch information
xmflsct authored Aug 19, 2022
2 parents 15f22d4 + d1a737e commit 8dcddd0
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 266 deletions.
16 changes: 8 additions & 8 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PODS:
- EXJSONUtils
- EXNotifications (0.16.1):
- ExpoModulesCore
- Expo (46.0.7):
- Expo (46.0.8):
- ExpoModulesCore
- ExpoCrypto (11.0.0):
- ExpoModulesCore
Expand All @@ -42,7 +42,7 @@ PODS:
- ExpoModulesCore
- ExpoLocalization (13.1.0):
- ExpoModulesCore
- ExpoModulesCore (0.11.3):
- ExpoModulesCore (0.11.4):
- React-Core
- ReactCommon/turbomodule/core
- ExpoRandom (12.3.0):
Expand Down Expand Up @@ -564,10 +564,10 @@ PODS:
- React-RCTText
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (3.15.0):
- RNScreens (3.16.0):
- React-Core
- React-RCTImage
- RNSentry (4.2.3):
- RNSentry (4.2.4):
- React-Core
- Sentry (= 7.23.0)
- RNShareMenu (6.0.0):
Expand Down Expand Up @@ -879,12 +879,12 @@ SPEC CHECKSUMS:
EXJSONUtils: 2a74b8f40f1523cc3f92af99c91aa78201737a77
EXManifests: b38dc61303f5eede990b4c8ecbfac32f82160e65
EXNotifications: 9a2aa201deb19dfe1dbe0e370eeb2922de0d2422
Expo: 8cb51419dfec611e6125e09384669eb71d3c4c6d
Expo: 2322364db3fe1adaa179787edb7e1bc6e5159c78
ExpoCrypto: e534314db0e1a17ae12b5140d529bd0c5efcbc6a
ExpoHaptics: efe9e68e9dfe0d15c183c0c70a25f3874124ab9e
ExpoKeepAwake: 0e8f18142e71bbf2c7f6aa66ebed249ba1420320
ExpoLocalization: 63204f4b9d4f653469d266332ceaa6c6ac8a305d
ExpoModulesCore: 8303cc952788be09fc6eab62815d257016ae6dec
ExpoModulesCore: e281bb7b78ea47e227dd5af94d04b24d8b2e1255
ExpoRandom: f9f1faa299a40733867f344d6b7bfa2d1f4ab04d
ExpoWebBrowser: 5804ac42a8269d0e534bc4461993005f72535649
EXScreenCapture: 23de056fdb02edd1fb8f147b0fd198c6d5cada3d
Expand Down Expand Up @@ -955,8 +955,8 @@ SPEC CHECKSUMS:
RNFastImage: 8e9b5b9e6df94d2e359c0a75a4745ad1311506fd
RNGestureHandler: bad495418bcbd3ab47017a38d93d290ebd406f50
RNReanimated: 2cf7451318bb9cc430abeec8d67693f9cf4e039c
RNScreens: 4a1af06327774490d97342c00aee0c2bafb497b7
RNSentry: 6798624706227656d942849d593f89c8ca3bdde5
RNScreens: ee31ecdf23fe81e93c74feaa086cf173d758ab58
RNSentry: 7495ba091f09f12902d8cf916024efd99b058efe
RNShareMenu: cb9dac548c8bf147d06f0bf07296ad51ea9f5fc3
RNSVG: 42a0c731b11179ebbd27a3eeeafa7201ebb476ff
SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "tooot",
"versions": {
"major": 4,
"minor": 2,
"patch": 1
"minor": 3,
"patch": 0
},
"description": "tooot app for Mastodon",
"author": "xmflsct <[email protected]>",
Expand Down Expand Up @@ -42,10 +42,10 @@
"@react-navigation/native-stack": "^6.7.0",
"@react-navigation/stack": "^6.2.2",
"@reduxjs/toolkit": "^1.8.4",
"@sentry/react-native": "^4.2.2",
"@sentry/react-native": "^4.2.4",
"@sharcoux/slider": "^6.0.3",
"axios": "^0.27.2",
"expo": "^46.0.7",
"expo": "^46.0.8",
"expo-auth-session": "^3.7.1",
"expo-av": "^12.0.4",
"expo-constants": "^13.2.3",
Expand All @@ -65,12 +65,12 @@
"expo-updates": "^0.14.4",
"expo-video-thumbnails": "^6.4.0",
"expo-web-browser": "^11.0.0",
"i18next": "^21.9.0",
"i18next": "^21.9.1",
"li": "^1.3.0",
"lodash": "^4.17.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^11.18.3",
"react-i18next": "^11.18.4",
"react-intl": "^6.0.5",
"react-native": "^0.69.4",
"react-native-animated-spinkit": "^1.5.2",
Expand All @@ -87,7 +87,7 @@
"react-native-pager-view": "^5.4.25",
"react-native-reanimated": "^2.9.1",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "^3.15.0",
"react-native-screens": "^3.16.0",
"react-native-share-menu": "^6.0.0",
"react-native-svg": "^13.0.0",
"react-native-swipe-list-view": "^3.2.9",
Expand All @@ -106,7 +106,7 @@
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@expo/config": "^7.0.1",
"@types/lodash": "^4.14.182",
"@types/lodash": "^4.14.184",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@types/react-native": "^0.69.5",
Expand Down
27 changes: 0 additions & 27 deletions patches/expo-modules-core+0.11.3.patch

This file was deleted.

14 changes: 7 additions & 7 deletions src/components/ContextMenu/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const contextMenuAccount = ({
const { t } = useTranslation('componentContextMenu')

const queryClient = useQueryClient()
const mutateion = useTimelineMutation({
const mutation = useTimelineMutation({
onSuccess: (_, params) => {
queryClient.refetchQueries(['Relationship', { id: accountId }])
const theParams = params as MutationVarsTimelineUpdateAccountProperty
Expand Down Expand Up @@ -65,8 +65,8 @@ const contextMenuAccount = ({
err.data &&
err.data.error &&
typeof err.data.error === 'string' && {
description: err.data.error
})
description: err.data.error
})
})
},
onSettled: () => {
Expand Down Expand Up @@ -117,7 +117,7 @@ const contextMenuAccount = ({
analytics('timeline_shared_headeractions_account_mute_press', {
page: queryKey && queryKey[1].page
})
mutateion.mutate({
mutation.mutate({
type: 'updateAccountProperty',
queryKey,
id: accountId,
Expand All @@ -128,18 +128,18 @@ const contextMenuAccount = ({
analytics('timeline_shared_headeractions_account_block_press', {
page: queryKey && queryKey[1].page
})
mutateion.mutate({
mutation.mutate({
type: 'updateAccountProperty',
queryKey,
id: accountId,
payload: { property: 'block', currentValue: relationship?.blocking }
})
}
if (actions[index].id === 'account-report') {
if (actions[index].id === 'account-reports') {
analytics('timeline_shared_headeractions_account_reports_press', {
page: queryKey && queryKey[1].page
})
mutateion.mutate({
mutation.mutate({
type: 'updateAccountProperty',
queryKey,
id: accountId,
Expand Down
8 changes: 4 additions & 4 deletions src/components/ContextMenu/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ const contextMenuStatus = ({
message: t('common:message.error.message', {
function: t(`status.${theFunction}.action`)
}),
...(err.status &&
...(err?.status &&
typeof err.status === 'number' &&
err.data &&
err.data.error &&
typeof err.data.error === 'string' && {
description: err.data.error
})
description: err.data.error
})
})
queryClient.setQueryData(queryKey, oldData)
}
Expand All @@ -70,7 +70,7 @@ const contextMenuStatus = ({
getInstanceAccount,
(prev, next) => prev.id === next.id
)
const ownAccount = instanceAccount?.id === status?.account.id
const ownAccount = instanceAccount?.id === status?.account?.id

if (ownAccount) {
const accountMenuItems: ContextMenuAction[] = [
Expand Down
23 changes: 8 additions & 15 deletions src/components/Header/Center.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ const HeaderCenter: React.FC<Props> = ({
const { colors } = useTheme()

return (
<View
style={{
flexDirection: 'row',
alignItems: 'center'
}}
>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<CustomText
style={{
color: inverted ? colors.primaryOverlay : colors.primaryDefault
Expand All @@ -38,15 +33,13 @@ const HeaderCenter: React.FC<Props> = ({
children={content}
{...(onPress && { onPress })}
/>
{dropdown ? (
<Icon
name='ChevronDown'
size={StyleConstants.Font.Size.M}
color={colors.primaryDefault}
style={{ marginLeft: StyleConstants.Spacing.XS }}
strokeWidth={3}
/>
) : null}
<Icon
name='ChevronDown'
size={StyleConstants.Font.Size.M}
color={colors.primaryDefault}
style={{ marginLeft: StyleConstants.Spacing.XS, opacity: dropdown ? undefined : 0 }}
strokeWidth={3}
/>
</View>
)
}
Expand Down
21 changes: 5 additions & 16 deletions src/screens/Tabs/Local.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import { HeaderCenter, HeaderRight } from '@components/Header'
import Timeline from '@components/Timeline'
import TimelineDefault from '@components/Timeline/Default'
import { createNativeStackNavigator } from '@react-navigation/native-stack'
import {
ScreenTabsScreenProps,
TabLocalStackParamList
} from '@utils/navigation/navigators'
import { ScreenTabsScreenProps, TabLocalStackParamList } from '@utils/navigation/navigators'
import { useListsQuery } from '@utils/queryHooks/lists'
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
import layoutAnimation from '@utils/styles/layoutAnimation'
Expand All @@ -26,10 +23,7 @@ const TabLocal = React.memo(
layoutAnimation()
}, [lists?.length])

const [queryKey, setQueryKey] = useState<QueryKeyTimeline>([
'Timeline',
{ page: 'Following' }
])
const [queryKey, setQueryKey] = useState<QueryKeyTimeline>(['Timeline', { page: 'Following' }])

return (
<Stack.Navigator screenOptions={{ headerShadowVisible: false }}>
Expand All @@ -51,9 +45,7 @@ const TabLocal = React.memo(
...lists.map(list => ({
id: list.id,
title: list.title,
disabled:
queryKey[1].page === 'List' &&
queryKey[1].list === list.id
disabled: queryKey[1].page === 'List' && queryKey[1].list === list.id
}))
]
: undefined
Expand All @@ -68,8 +60,7 @@ const TabLocal = React.memo(
dropdown={(lists?.length ?? 0) > 0}
content={
queryKey[1].page === 'List' && queryKey[1].list?.length
? lists?.find(list => list.id === queryKey[1].list)
?.title
? lists?.find(list => list.id === queryKey[1].list)?.title
: t('tabs.local.name')
}
/>
Expand All @@ -96,9 +87,7 @@ const TabLocal = React.memo(
queryKey={queryKey}
lookback='Following'
customProps={{
renderItem: ({ item }) => (
<TimelineDefault item={item} queryKey={queryKey} />
)
renderItem: ({ item }) => <TimelineDefault item={item} queryKey={queryKey} />
}}
/>
)}
Expand Down
26 changes: 13 additions & 13 deletions src/screens/Tabs/Me/Profile/Root/AvatarHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,26 @@ const ProfileAvatarHeader: React.FC<Props> = ({ type, messageRef }) => {
? { width: 400, height: 400 }
: { width: 1500, height: 500 }
})
if (!image[0].uri) {
if (image[0].uri) {
mutation.mutate({
theme,
messageRef,
message: {
text: `me.profile.root.${type}.title`,
succeed: true,
failed: true
},
type,
data: image[0].uri
})
} else {
displayMessage({
ref: messageRef,
message: t('screenTabs:me.profile.mediaSelectionFailed'),
theme: theme,
type: 'error'
})
return
}
mutation.mutate({
theme,
messageRef,
message: {
text: `me.profile.root.${type}.title`,
succeed: true,
failed: true
},
type,
data: image[0].uri
})
}}
/>
)
Expand Down
Loading

0 comments on commit 8dcddd0

Please sign in to comment.