mirror of
https://github.com/tooot-app/app
synced 2025-02-01 19:16:56 +01:00
Refine RN 0.64
This commit is contained in:
parent
d2addd1b11
commit
bcb55254f9
@ -12,12 +12,12 @@ RELEASE_CHANNEL = "#{VERSIONS[:major]}-#{ENVIRONMENT}"
|
||||
BUILD_NUMBER = ENV["GITHUB_RUN_NUMBER"]
|
||||
GITHUB_REPO = "tooot-app/app"
|
||||
case ENVIRONMENT
|
||||
when "main"
|
||||
GITHUB_RELEASE= ""
|
||||
when "candidate"
|
||||
GITHUB_RELEASE = "v#{VERSION}-#{VERSIONS[:patch]}"
|
||||
when "release"
|
||||
GITHUB_RELEASE = "v#{VERSION}"
|
||||
else
|
||||
GITHUB_RELEASE= ""
|
||||
end
|
||||
|
||||
XCODEPROJ = "./ios/tooot.xcodeproj"
|
||||
@ -82,7 +82,7 @@ private_lane :build_ios do
|
||||
install_pods_ios
|
||||
prepare_appstore_ios
|
||||
match( type: "appstore", readonly: true )
|
||||
build_ios_app( export_method: "app-store", include_symbols: true, include_bitcode: true )
|
||||
build_ios_app( export_method: "app-store", include_symbols: true, include_bitcode: true, silent: true )
|
||||
upload_to_testflight(
|
||||
demo_account_required: true,
|
||||
distribute_external: true,
|
||||
@ -92,12 +92,12 @@ private_lane :build_ios do
|
||||
when "release"
|
||||
install_pods_ios
|
||||
prepare_appstore_ios
|
||||
match( type: "appstore", readonly: true, include_bitcode: true )
|
||||
build_ios_app( export_method: "app-store" )
|
||||
match( type: "appstore", readonly: true )
|
||||
build_ios_app( export_method: "app-store", include_bitcode: true, silent: true )
|
||||
else
|
||||
if !is_ci
|
||||
match( type: "development", readonly: true )
|
||||
build_ios_app( export_method: "development", output_directory: BUILD_DIRECTORY )
|
||||
build_ios_app( export_method: "development", output_directory: BUILD_DIRECTORY, silent: true )
|
||||
install_on_device( skip_wifi: true )
|
||||
end
|
||||
end
|
||||
|
@ -487,7 +487,7 @@ PODS:
|
||||
- React-RCTVibration
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- RNScreens (2.18.1):
|
||||
- RNScreens (2.17.1):
|
||||
- React-Core
|
||||
- RNSentry (2.3.0):
|
||||
- React-Core
|
||||
@ -889,7 +889,7 @@ SPEC CHECKSUMS:
|
||||
RNFastImage: d4870d58f5936111c56218dbd7fcfc18e65b58ff
|
||||
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
|
||||
RNReanimated: 64f6c5789f82818c07ba3c71864b73619cb23c76
|
||||
RNScreens: f7ad633b2e0190b77b6a7aab7f914fad6f198d8d
|
||||
RNScreens: b6c9607e6fe47c1b6e2f1910d2acd46dd7ecea3a
|
||||
RNSentry: 4f6907f9a4a41058988ebaa17666e9a402b50ff2
|
||||
RNSVG: ce9d996113475209013317e48b05c21ee988d42e
|
||||
SDWebImage: e378178472b735e84b007bfb55514c97948a0598
|
||||
|
@ -72,7 +72,7 @@
|
||||
"react-native-pager-view": "^5.1.2",
|
||||
"react-native-reanimated": "^2.0.0",
|
||||
"react-native-safe-area-context": "3.2.0",
|
||||
"react-native-screens": "~2.18.1",
|
||||
"react-native-screens": "~2.17.1",
|
||||
"react-native-svg": "12.1.0",
|
||||
"react-native-swipe-list-view": "^3.2.6",
|
||||
"react-native-tab-view": "^3.0.0",
|
||||
|
@ -140,20 +140,13 @@ const TimelineConversation: React.FC<Props> = ({
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
status={conversation.last_status}
|
||||
accts={conversation.accounts.map(account => account.acct)}
|
||||
reblog={false}
|
||||
/>
|
||||
</View>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
status={conversation.last_status}
|
||||
highlighted={highlighted}
|
||||
accts={conversation.accounts.map(account => account.acct)}
|
||||
reblog={false}
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
</Pressable>
|
||||
|
@ -132,27 +132,19 @@ const TimelineDefault: React.FC<Props> = ({
|
||||
<TimelineActionsUsers status={actualStatus} highlighted={highlighted} />
|
||||
|
||||
{queryKey && !disableDetails && (
|
||||
<View
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
rootQueryKey={rootQueryKey}
|
||||
status={actualStatus}
|
||||
accts={uniqBy(
|
||||
([actualStatus.account] as Mastodon.Account[] &
|
||||
Mastodon.Mention[])
|
||||
.concat(actualStatus.mentions)
|
||||
.filter(d => d.id !== instanceAccount?.id),
|
||||
d => d.id
|
||||
).map(d => d.acct)}
|
||||
reblog={item.reblog ? true : false}
|
||||
/>
|
||||
</View>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
rootQueryKey={rootQueryKey}
|
||||
highlighted={highlighted}
|
||||
status={actualStatus}
|
||||
accts={uniqBy(
|
||||
([actualStatus.account] as Mastodon.Account[] & Mastodon.Mention[])
|
||||
.concat(actualStatus.mentions)
|
||||
.filter(d => d?.id !== instanceAccount?.id),
|
||||
d => d.id
|
||||
).map(d => d.acct)}
|
||||
reblog={item.reblog ? true : false}
|
||||
/>
|
||||
)}
|
||||
</Pressable>
|
||||
)
|
||||
|
@ -129,28 +129,21 @@ const TimelineNotifications: React.FC<Props> = ({
|
||||
) : null}
|
||||
</View>
|
||||
|
||||
{notification.status && (
|
||||
<View
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
status={notification.status}
|
||||
accts={uniqBy(
|
||||
([notification.status.account] as Mastodon.Account[] &
|
||||
Mastodon.Mention[])
|
||||
.concat(notification.status.mentions)
|
||||
.filter(d => d.id !== instanceAccount?.id),
|
||||
d => d.id
|
||||
).map(d => d.acct)}
|
||||
reblog={false}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
{notification.status ? (
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
status={notification.status}
|
||||
highlighted={highlighted}
|
||||
accts={uniqBy(
|
||||
([notification.status.account] as Mastodon.Account[] &
|
||||
Mastodon.Mention[])
|
||||
.concat(notification.status.mentions)
|
||||
.filter(d => d.id !== instanceAccount?.id),
|
||||
d => d.id
|
||||
).map(d => d.acct)}
|
||||
reblog={false}
|
||||
/>
|
||||
) : null}
|
||||
</Pressable>
|
||||
)
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React, { useCallback, useRef, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { StyleSheet, Text, View } from 'react-native'
|
||||
import { Platform, StyleSheet, Text, View } from 'react-native'
|
||||
import { Circle } from 'react-native-animated-spinkit'
|
||||
import Animated, {
|
||||
Extrapolate,
|
||||
@ -45,6 +45,9 @@ const TimelineRefresh: React.FC<Props> = ({
|
||||
fetchingType,
|
||||
disableRefresh = false
|
||||
}) => {
|
||||
if (Platform.OS !== 'ios') {
|
||||
return null
|
||||
}
|
||||
if (disableRefresh) {
|
||||
return null
|
||||
}
|
||||
|
@ -17,13 +17,14 @@ import { useQueryClient } from 'react-query'
|
||||
export interface Props {
|
||||
queryKey: QueryKeyTimeline
|
||||
rootQueryKey?: QueryKeyTimeline
|
||||
highlighted: boolean
|
||||
status: Mastodon.Status
|
||||
accts: Mastodon.Account['acct'][] // When replying to conversations
|
||||
reblog: boolean
|
||||
}
|
||||
|
||||
const TimelineActions = React.memo(
|
||||
({ queryKey, rootQueryKey, status, accts, reblog }: Props) => {
|
||||
({ queryKey, rootQueryKey, highlighted, status, accts, reblog }: Props) => {
|
||||
const navigation = useNavigation()
|
||||
const { t } = useTranslation('componentTimeline')
|
||||
const { mode, theme } = useTheme()
|
||||
@ -256,7 +257,13 @@ const TimelineActions = React.memo(
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
<View
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<View style={styles.actions}>
|
||||
<Pressable
|
||||
style={styles.action}
|
||||
@ -285,7 +292,7 @@ const TimelineActions = React.memo(
|
||||
children={childrenBookmark}
|
||||
/>
|
||||
</View>
|
||||
</>
|
||||
</View>
|
||||
)
|
||||
},
|
||||
() => true
|
||||
|
@ -24,9 +24,9 @@ const TimelineFullConversation = React.memo(
|
||||
).length) ? (
|
||||
<Text
|
||||
style={{
|
||||
...StyleConstants.FontStyle.M,
|
||||
...StyleConstants.FontStyle.S,
|
||||
color: theme.blue,
|
||||
marginTop: StyleConstants.Font.Size.M / 2
|
||||
marginTop: StyleConstants.Font.Size.S
|
||||
}}
|
||||
>
|
||||
{t('shared.fullConversation')}
|
||||
|
@ -36,7 +36,7 @@ export default {
|
||||
function: '转嘟'
|
||||
},
|
||||
bookmarked: {
|
||||
function: '收藏嘟文'
|
||||
function: '喜欢嘟文'
|
||||
}
|
||||
},
|
||||
actionsUsers: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default {
|
||||
heading: '收藏',
|
||||
heading: '喜欢',
|
||||
content: {}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ export default {
|
||||
},
|
||||
statuses: {
|
||||
reblogged_by: '{{count}} 人转嘟',
|
||||
favourited_by: '{{count}} 人收藏'
|
||||
favourited_by: '{{count}} 人喜欢'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import analytics from '@components/analytics'
|
||||
import { HeaderLeft, HeaderRight } from '@components/Header'
|
||||
import { HeaderCenter, HeaderLeft, HeaderRight } from '@components/Header'
|
||||
import { StackScreenProps } from '@react-navigation/stack'
|
||||
import haptics from '@root/components/haptics'
|
||||
import formatText from '@screens/Compose/formatText'
|
||||
@ -371,6 +371,13 @@ const ScreenCompose: React.FC<ScreenComposeProp> = ({
|
||||
},
|
||||
headerTintColor:
|
||||
totalTextCount > maxTootChars ? theme.red : theme.secondary,
|
||||
headerCenter: () => (
|
||||
<HeaderCenter
|
||||
content={`${totalTextCount} / ${maxTootChars}${
|
||||
__DEV__ ? ` Dirty: ${composeState.dirty.toString()}` : ''
|
||||
}`}
|
||||
/>
|
||||
),
|
||||
headerRight
|
||||
}}
|
||||
/>
|
||||
|
@ -39,7 +39,8 @@ const ComposeEditAttachmentSubmit: React.FC<Props> = ({ index }) => {
|
||||
) {
|
||||
formData.append(
|
||||
'focus',
|
||||
`${theAttachment.meta.focus.x},${-theAttachment.meta.focus.y}`
|
||||
`${theAttachment.meta.focus.x || 0},${-theAttachment.meta.focus.y ||
|
||||
0}`
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,14 @@ const sharedScreens = (
|
||||
}
|
||||
}: SharedUsersProp) => ({
|
||||
headerLeft: () => <HeaderLeft onPress={() => navigation.goBack()} />,
|
||||
headerTitle: t(`sharedUsers:heading.${reference}.${type}`, { count })
|
||||
headerTitle: t(`sharedUsers:heading.${reference}.${type}`, { count }),
|
||||
...(Platform.OS === 'android' && {
|
||||
headerCenter: () => (
|
||||
<HeaderCenter
|
||||
content={t(`sharedUsers:heading.${reference}.${type}`, { count })}
|
||||
/>
|
||||
)
|
||||
})
|
||||
})}
|
||||
/>
|
||||
]
|
||||
|
@ -6,14 +6,14 @@ export const StyleConstants = {
|
||||
LineHeight: {
|
||||
S: 20,
|
||||
M: 22,
|
||||
L: 30
|
||||
L: 28
|
||||
},
|
||||
Weight: { Normal: '400' as '400', Bold: '600' as '600' }
|
||||
},
|
||||
FontStyle: {
|
||||
S: { fontSize: 14, lineHeight: 20 },
|
||||
M: { fontSize: 16, lineHeight: 22 },
|
||||
L: { fontSize: 20, lineHeight: 30 }
|
||||
L: { fontSize: 20, lineHeight: 28 }
|
||||
},
|
||||
|
||||
Spacing: {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { Dimensions } from 'react-native'
|
||||
// import { Dimensions } from 'react-native'
|
||||
|
||||
const { width } = Dimensions.get('screen')
|
||||
// const { width } = Dimensions.get('screen')
|
||||
|
||||
const guidelineBaseWidth = 375
|
||||
// const guidelineBaseWidth = 375
|
||||
// const guidelineBaseHeight = 667
|
||||
|
||||
const scale = (size: number) => (width / guidelineBaseWidth) * size
|
||||
// const scale = (size: number) => (width / guidelineBaseWidth) * size
|
||||
// const verticalScale = (size: number) => (height / guidelineBaseHeight) * size
|
||||
// const adaptiveScale = (size: number, factor: number = 0) =>
|
||||
// size + (scale(size) - size) * factor
|
||||
|
@ -8809,10 +8809,10 @@ react-native-safe-area-view@^0.14.9:
|
||||
dependencies:
|
||||
hoist-non-react-statics "^2.3.1"
|
||||
|
||||
react-native-screens@~2.18.1:
|
||||
version "2.18.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.18.1.tgz#47b9991c6f762d00d0ed3233e5283d523e859885"
|
||||
integrity sha512-r5WZLpmx2hHjC1RgMdPq5YpSU9tEhBpUaZ5M1SUtNIONyiLqQVxabhRCINdebIk4depJiIl7yw2Q85zJyeX6fw==
|
||||
react-native-screens@~2.17.1:
|
||||
version "2.17.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.17.1.tgz#c3c0ac750af48741c5b1635511e6af2a27b74309"
|
||||
integrity sha512-B4gD5e4csvlVwlhf+RNqjQZ9mHTwe/iL3rXondgZxnKz4oW0QAmtLnLRKOrYVxoaJaF9Fy7jhjo//24/472APQ==
|
||||
|
||||
react-native-svg@12.1.0:
|
||||
version "12.1.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user