mirror of
https://github.com/tooot-app/app
synced 2025-06-02 04:09:15 +02:00
commit
938e74e1b2
@ -48,7 +48,7 @@
|
|||||||
"@sentry/react-native": "^4.2.2",
|
"@sentry/react-native": "^4.2.2",
|
||||||
"@sharcoux/slider": "^6.0.3",
|
"@sharcoux/slider": "^6.0.3",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"expo": "^46.0.6",
|
"expo": "^46.0.7",
|
||||||
"expo-auth-session": "^3.7.1",
|
"expo-auth-session": "^3.7.1",
|
||||||
"expo-av": "^12.0.4",
|
"expo-av": "^12.0.4",
|
||||||
"expo-constants": "^13.2.3",
|
"expo-constants": "^13.2.3",
|
||||||
|
22
patches/expo-modules-core+0.11.3.patch
Normal file
22
patches/expo-modules-core+0.11.3.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/node_modules/expo-modules-core/android/build.gradle b/node_modules/expo-modules-core/android/build.gradle
|
||||||
|
index a57c367..47c7bd6 100644
|
||||||
|
--- a/node_modules/expo-modules-core/android/build.gradle
|
||||||
|
+++ b/node_modules/expo-modules-core/android/build.gradle
|
||||||
|
@@ -422,7 +422,7 @@ task prepareFolly(dependsOn: [downloadFolly], type: Copy) {
|
||||||
|
}
|
||||||
|
// END FOLLy
|
||||||
|
|
||||||
|
-task prepareHermes() {
|
||||||
|
+task prepareHermes(dependsOn: createNativeDepsDirectories) {
|
||||||
|
if (!FOR_HERMES) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@@ -444,7 +444,7 @@ afterEvaluate {
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.whenTaskAdded { task ->
|
||||||
|
- if (!task.name.contains("Clean") && (task.name.contains('externalNativeBuild') || task.name.startsWith('configureCMake'))) {
|
||||||
|
+ if (!task.name.contains("Clean") && (task.name.contains('externalNativeBuild'))) {
|
||||||
|
def buildType = task.name.endsWith('Debug') ? 'Debug' : 'Release'
|
||||||
|
task.dependsOn(extractAARHeaders)
|
||||||
|
task.dependsOn(extractJNIFiles)
|
@ -1,31 +1,53 @@
|
|||||||
|
import Icon from '@components/Icon'
|
||||||
import CustomText from '@components/Text'
|
import CustomText from '@components/Text'
|
||||||
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import { View } from 'react-native'
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
content: React.ReactNode | string
|
content?: string
|
||||||
inverted?: boolean
|
inverted?: boolean
|
||||||
onPress?: () => void
|
onPress?: () => void
|
||||||
|
dropdown?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used for Android mostly
|
// Used for Android mostly
|
||||||
const HeaderCenter: React.FC<Props> = ({
|
const HeaderCenter: React.FC<Props> = ({
|
||||||
content,
|
content,
|
||||||
inverted = false,
|
inverted = false,
|
||||||
onPress
|
onPress,
|
||||||
|
dropdown = false
|
||||||
}) => {
|
}) => {
|
||||||
const { colors } = useTheme()
|
const { colors } = useTheme()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomText
|
<View
|
||||||
style={{
|
style={{
|
||||||
fontSize: 18,
|
flexDirection: 'row',
|
||||||
color: inverted ? colors.primaryOverlay : colors.primaryDefault
|
alignItems: 'center'
|
||||||
}}
|
}}
|
||||||
fontWeight='Bold'
|
>
|
||||||
children={content}
|
<CustomText
|
||||||
{...(onPress && { onPress })}
|
style={{
|
||||||
/>
|
color: inverted ? colors.primaryOverlay : colors.primaryDefault
|
||||||
|
}}
|
||||||
|
fontSize='L'
|
||||||
|
fontWeight='Bold'
|
||||||
|
numberOfLines={1}
|
||||||
|
children={content}
|
||||||
|
{...(onPress && { onPress })}
|
||||||
|
/>
|
||||||
|
{dropdown ? (
|
||||||
|
<Icon
|
||||||
|
name='ChevronDown'
|
||||||
|
size={StyleConstants.Font.Size.M}
|
||||||
|
color={colors.primaryDefault}
|
||||||
|
style={{ marginLeft: StyleConstants.Spacing.XS }}
|
||||||
|
strokeWidth={3}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ const ParseHTML = React.memo(
|
|||||||
color: colors.primaryDefault,
|
color: colors.primaryDefault,
|
||||||
marginRight: StyleConstants.Spacing.S
|
marginRight: StyleConstants.Spacing.S
|
||||||
}}
|
}}
|
||||||
children={t(`HTML.expanded.${expanded.toString()}`, {
|
children={t('HTML.expanded', {
|
||||||
hint: expandHint,
|
hint: expandHint,
|
||||||
totalLines:
|
totalLines:
|
||||||
numberOfLines > 1 && typeof totalLines === 'number'
|
numberOfLines > 1 && typeof totalLines === 'number'
|
||||||
|
@ -47,20 +47,6 @@ const TimelineAttachment = React.memo(
|
|||||||
>([])
|
>([])
|
||||||
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>()
|
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>()
|
||||||
const navigateToImagesViewer = (id: string) => {
|
const navigateToImagesViewer = (id: string) => {
|
||||||
status.media_attachments.forEach(attachment => {
|
|
||||||
switch (attachment.type) {
|
|
||||||
case 'image':
|
|
||||||
imageUrls.current.push({
|
|
||||||
id: attachment.id,
|
|
||||||
preview_url: attachment.preview_url,
|
|
||||||
url: attachment.url,
|
|
||||||
remote_url: attachment.remote_url,
|
|
||||||
blurhash: attachment.blurhash,
|
|
||||||
width: attachment.meta?.original?.width,
|
|
||||||
height: attachment.meta?.original?.height
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
navigation.navigate('Screen-ImagesViewer', {
|
navigation.navigate('Screen-ImagesViewer', {
|
||||||
imageUrls: imageUrls.current,
|
imageUrls: imageUrls.current,
|
||||||
id
|
id
|
||||||
@ -82,6 +68,15 @@ const TimelineAttachment = React.memo(
|
|||||||
{status.media_attachments.map((attachment, index) => {
|
{status.media_attachments.map((attachment, index) => {
|
||||||
switch (attachment.type) {
|
switch (attachment.type) {
|
||||||
case 'image':
|
case 'image':
|
||||||
|
imageUrls.current.push({
|
||||||
|
id: attachment.id,
|
||||||
|
preview_url: attachment.preview_url,
|
||||||
|
url: attachment.url,
|
||||||
|
remote_url: attachment.remote_url,
|
||||||
|
blurhash: attachment.blurhash,
|
||||||
|
width: attachment.meta?.original?.width,
|
||||||
|
height: attachment.meta?.original?.height
|
||||||
|
})
|
||||||
return (
|
return (
|
||||||
<AttachmentImage
|
<AttachmentImage
|
||||||
key={index}
|
key={index}
|
||||||
|
@ -99,6 +99,7 @@ const AttachmentVideo: React.FC<Props> = ({
|
|||||||
opacity: sensitiveShown ? 0 : 1
|
opacity: sensitiveShown ? 0 : 1
|
||||||
}}
|
}}
|
||||||
usePoster
|
usePoster
|
||||||
|
resizeMode={ResizeMode.COVER}
|
||||||
{...(gifv
|
{...(gifv
|
||||||
? {
|
? {
|
||||||
shouldPlay: true,
|
shouldPlay: true,
|
||||||
@ -107,7 +108,6 @@ const AttachmentVideo: React.FC<Props> = ({
|
|||||||
source: { uri: video.url }
|
source: { uri: video.url }
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
resizeMode: ResizeMode.COVER,
|
|
||||||
posterSource: { uri: video.preview_url },
|
posterSource: { uri: video.preview_url },
|
||||||
posterStyle: { resizeMode: ResizeMode.COVER }
|
posterStyle: { resizeMode: ResizeMode.COVER }
|
||||||
})}
|
})}
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
"HTML": {
|
"HTML": {
|
||||||
"accessibilityHint": "",
|
"accessibilityHint": "",
|
||||||
"expanded": {
|
"expanded": "{{hint}}{{totalLines}}",
|
||||||
"true": "",
|
|
||||||
"false": ""
|
|
||||||
},
|
|
||||||
"totalLines": "",
|
"totalLines": "",
|
||||||
"defaultHint": ""
|
"defaultHint": ""
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
"accessibilityHint": "Zum Profil von {{name}}"
|
"accessibilityHint": "Zum Profil von {{name}}"
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
"expandHint": ""
|
"expandHint": "Ausgeblendeter Inhalt"
|
||||||
},
|
},
|
||||||
"filtered": "Ausgeblendet",
|
"filtered": "Ausgeblendet",
|
||||||
"fullConversation": "Unterhaltung anzeigen",
|
"fullConversation": "Unterhaltung anzeigen",
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
"HTML": {
|
"HTML": {
|
||||||
"accessibilityHint": "Tap to expand or collapse content",
|
"accessibilityHint": "Tap to expand or collapse content",
|
||||||
"expanded": {
|
"expanded": "{{hint}}{{totalLines}}",
|
||||||
"true": "{{hint}}{{totalLines}}",
|
|
||||||
"false": "{{hint}}{{totalLines}}"
|
|
||||||
},
|
|
||||||
"totalLines": " ({{count}} lines)",
|
"totalLines": " ({{count}} lines)",
|
||||||
"defaultHint": "Long toot"
|
"defaultHint": "Long toot"
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
"HTML": {
|
"HTML": {
|
||||||
"accessibilityHint": "",
|
"accessibilityHint": "",
|
||||||
"expanded": {
|
"expanded": "{{hint}}{{totalLines}}",
|
||||||
"true": "",
|
|
||||||
"false": ""
|
|
||||||
},
|
|
||||||
"totalLines": "",
|
"totalLines": "",
|
||||||
"defaultHint": ""
|
"defaultHint": ""
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
"accessibilityHint": "Premi per aprire il profilo di {{name}}"
|
"accessibilityHint": "Premi per aprire il profilo di {{name}}"
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
"expandHint": ""
|
"expandHint": "Contenuto nascosto"
|
||||||
},
|
},
|
||||||
"filtered": "Filtrato",
|
"filtered": "Filtrato",
|
||||||
"fullConversation": "Leggi la conversazione",
|
"fullConversation": "Leggi la conversazione",
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
"HTML": {
|
"HTML": {
|
||||||
"accessibilityHint": "",
|
"accessibilityHint": "",
|
||||||
"expanded": {
|
"expanded": "{{hint}}{{totalLines}}",
|
||||||
"true": "",
|
|
||||||
"false": ""
|
|
||||||
},
|
|
||||||
"totalLines": "",
|
"totalLines": "",
|
||||||
"defaultHint": ""
|
"defaultHint": ""
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
"HTML": {
|
"HTML": {
|
||||||
"accessibilityHint": "",
|
"accessibilityHint": "",
|
||||||
"expanded": {
|
"expanded": "{{hint}}{{totalLines}}",
|
||||||
"true": "",
|
|
||||||
"false": ""
|
|
||||||
},
|
|
||||||
"totalLines": "",
|
"totalLines": "",
|
||||||
"defaultHint": ""
|
"defaultHint": ""
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
"accessibilityHint": "{{name}}의 페이지로 가려면 탭하세요"
|
"accessibilityHint": "{{name}}의 페이지로 가려면 탭하세요"
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
"expandHint": ""
|
"expandHint": "숨겨진 콘텐츠"
|
||||||
},
|
},
|
||||||
"filtered": "필터됨",
|
"filtered": "필터됨",
|
||||||
"fullConversation": "대화 보기",
|
"fullConversation": "대화 보기",
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
"HTML": {
|
"HTML": {
|
||||||
"accessibilityHint": "",
|
"accessibilityHint": "Toque para expandir ou recolher conteúdo",
|
||||||
"expanded": {
|
"expanded": "{{hint}}{{totalLines}}",
|
||||||
"true": "",
|
|
||||||
"false": ""
|
|
||||||
},
|
|
||||||
"totalLines": "",
|
"totalLines": "",
|
||||||
"defaultHint": ""
|
"defaultHint": ""
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
"accessibilityHint": "Toque para ir à página de {{name}}"
|
"accessibilityHint": "Toque para ir à página de {{name}}"
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
"expandHint": ""
|
"expandHint": "Conteúdo oculto"
|
||||||
},
|
},
|
||||||
"filtered": "Filtrado",
|
"filtered": "Filtrado",
|
||||||
"fullConversation": "Ler conversas",
|
"fullConversation": "Ler conversas",
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
"HTML": {
|
"HTML": {
|
||||||
"accessibilityHint": "",
|
"accessibilityHint": "",
|
||||||
"expanded": {
|
"expanded": "{{hint}}{{totalLines}}",
|
||||||
"true": "",
|
|
||||||
"false": ""
|
|
||||||
},
|
|
||||||
"totalLines": "",
|
"totalLines": "",
|
||||||
"defaultHint": ""
|
"defaultHint": ""
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
"accessibilityHint": "Đến trang của {{name}}"
|
"accessibilityHint": "Đến trang của {{name}}"
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
"expandHint": ""
|
"expandHint": "Nội dung ẩn"
|
||||||
},
|
},
|
||||||
"filtered": "Đã lọc",
|
"filtered": "Đã lọc",
|
||||||
"fullConversation": "Xem thêm",
|
"fullConversation": "Xem thêm",
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"copy": {
|
"copy": {
|
||||||
"action": "",
|
"action": "复制嘟文",
|
||||||
"succeed": ""
|
"succeed": "已复制"
|
||||||
},
|
},
|
||||||
"instance": {
|
"instance": {
|
||||||
"title": "实例操作",
|
"title": "实例操作",
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
{
|
{
|
||||||
"HTML": {
|
"HTML": {
|
||||||
"accessibilityHint": "",
|
"accessibilityHint": "点击展开或折叠内容",
|
||||||
"expanded": {
|
"expanded": "{{hint}}{{totalLines}}",
|
||||||
"true": "",
|
"totalLines": " ({{count}} 行)",
|
||||||
"false": ""
|
"defaultHint": "长嘟文"
|
||||||
},
|
|
||||||
"totalLines": "",
|
|
||||||
"defaultHint": ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -81,7 +81,7 @@
|
|||||||
"accessibilityHint": "点击进入{{name}}的页面"
|
"accessibilityHint": "点击进入{{name}}的页面"
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
"expandHint": ""
|
"expandHint": "隐藏内容"
|
||||||
},
|
},
|
||||||
"filtered": "已过滤",
|
"filtered": "已过滤",
|
||||||
"fullConversation": "阅读全部对话",
|
"fullConversation": "阅读全部对话",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"heading": "",
|
"heading": "分享到...",
|
||||||
"content": {
|
"content": {
|
||||||
"select_account": ""
|
"select_account": "选择帐号"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -146,7 +146,7 @@
|
|||||||
"label": "标签",
|
"label": "标签",
|
||||||
"content": "内容"
|
"content": "内容"
|
||||||
},
|
},
|
||||||
"mediaSelectionFailed": ""
|
"mediaSelectionFailed": "图片处理失败,请重试"
|
||||||
},
|
},
|
||||||
"push": {
|
"push": {
|
||||||
"notAvailable": "您的手机不支持tooot推送通知",
|
"notAvailable": "您的手机不支持tooot推送通知",
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
{
|
{
|
||||||
"HTML": {
|
"HTML": {
|
||||||
"accessibilityHint": "",
|
"accessibilityHint": "",
|
||||||
"expanded": {
|
"expanded": "{{hint}}{{totalLines}}",
|
||||||
"true": "",
|
|
||||||
"false": ""
|
|
||||||
},
|
|
||||||
"totalLines": "",
|
"totalLines": "",
|
||||||
"defaultHint": ""
|
"defaultHint": ""
|
||||||
}
|
}
|
||||||
|
@ -2,13 +2,9 @@ import analytics from '@components/analytics'
|
|||||||
import { HeaderCenter, HeaderLeft, HeaderRight } from '@components/Header'
|
import { HeaderCenter, HeaderLeft, HeaderRight } from '@components/Header'
|
||||||
import { Message } from '@components/Message'
|
import { Message } from '@components/Message'
|
||||||
import { useActionSheet } from '@expo/react-native-action-sheet'
|
import { useActionSheet } from '@expo/react-native-action-sheet'
|
||||||
import { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
import { RootStackScreenProps } from '@utils/navigation/navigators'
|
||||||
import {
|
|
||||||
RootStackParamList,
|
|
||||||
RootStackScreenProps
|
|
||||||
} from '@utils/navigation/navigators'
|
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { RefObject, useCallback, useRef, useState } from 'react'
|
import React, { useCallback, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Platform, Share, StatusBar, View } from 'react-native'
|
import { Platform, Share, StatusBar, View } from 'react-native'
|
||||||
import FlashMessage from 'react-native-flash-message'
|
import FlashMessage from 'react-native-flash-message'
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import analytics from '@components/analytics'
|
import analytics from '@components/analytics'
|
||||||
import { HeaderCenter, HeaderRight } from '@components/Header'
|
import { HeaderCenter, HeaderRight } from '@components/Header'
|
||||||
import Icon from '@components/Icon'
|
|
||||||
import CustomText from '@components/Text'
|
|
||||||
import Timeline from '@components/Timeline'
|
import Timeline from '@components/Timeline'
|
||||||
import TimelineDefault from '@components/Timeline/Default'
|
import TimelineDefault from '@components/Timeline/Default'
|
||||||
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
||||||
@ -11,26 +9,22 @@ import {
|
|||||||
} from '@utils/navigation/navigators'
|
} from '@utils/navigation/navigators'
|
||||||
import { useListsQuery } from '@utils/queryHooks/lists'
|
import { useListsQuery } from '@utils/queryHooks/lists'
|
||||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
|
||||||
import layoutAnimation from '@utils/styles/layoutAnimation'
|
import layoutAnimation from '@utils/styles/layoutAnimation'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Pressable, StyleSheet, Text, View } from 'react-native'
|
import ContextMenu from 'react-native-context-menu-view'
|
||||||
import TabSharedRoot from './Shared/Root'
|
import TabSharedRoot from './Shared/Root'
|
||||||
|
|
||||||
const Stack = createNativeStackNavigator<TabLocalStackParamList>()
|
const Stack = createNativeStackNavigator<TabLocalStackParamList>()
|
||||||
|
|
||||||
const TabLocal = React.memo(
|
const TabLocal = React.memo(
|
||||||
({ navigation }: ScreenTabsScreenProps<'Tab-Local'>) => {
|
({ navigation }: ScreenTabsScreenProps<'Tab-Local'>) => {
|
||||||
const { colors } = useTheme()
|
|
||||||
const { t } = useTranslation('screenTabs')
|
const { t } = useTranslation('screenTabs')
|
||||||
|
|
||||||
const { data: lists } = useListsQuery({})
|
const { data: lists } = useListsQuery({})
|
||||||
const [listsShown, setListsShown] = useState(false)
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
layoutAnimation()
|
layoutAnimation()
|
||||||
}, [listsShown])
|
}, [lists?.length])
|
||||||
|
|
||||||
const [queryKey, setQueryKey] = useState<QueryKeyTimeline>([
|
const [queryKey, setQueryKey] = useState<QueryKeyTimeline>([
|
||||||
'Timeline',
|
'Timeline',
|
||||||
@ -43,25 +37,42 @@ const TabLocal = React.memo(
|
|||||||
name='Tab-Local-Root'
|
name='Tab-Local-Root'
|
||||||
options={{
|
options={{
|
||||||
headerTitle: () => (
|
headerTitle: () => (
|
||||||
<HeaderCenter
|
<ContextMenu
|
||||||
onPress={() => {
|
dropdownMenuMode
|
||||||
if (lists?.length) {
|
style={{ maxWidth: '80%' }}
|
||||||
setListsShown(!listsShown)
|
actions={
|
||||||
}
|
lists?.length
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
id: '',
|
||||||
|
title: t('tabs.local.name'),
|
||||||
|
disabled: queryKey[1].page === 'Following'
|
||||||
|
},
|
||||||
|
...lists.map(list => ({
|
||||||
|
id: list.id,
|
||||||
|
title: list.title,
|
||||||
|
disabled:
|
||||||
|
queryKey[1].page === 'List' &&
|
||||||
|
queryKey[1].list === list.id
|
||||||
|
}))
|
||||||
|
]
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
|
onPress={({ nativeEvent: { id } }) => {
|
||||||
|
id.length
|
||||||
|
? setQueryKey(['Timeline', { page: 'List', list: id }])
|
||||||
|
: setQueryKey(['Timeline', { page: 'Following' }])
|
||||||
}}
|
}}
|
||||||
content={
|
children={
|
||||||
<>
|
<HeaderCenter
|
||||||
<Text>{t('tabs.local.name')}</Text>
|
dropdown={(lists?.length ?? 0) > 0}
|
||||||
{lists?.length ? (
|
content={
|
||||||
<Icon
|
queryKey[1].page === 'List' && queryKey[1].list?.length
|
||||||
name='ChevronDown'
|
? lists?.find(list => list.id === queryKey[1].list)
|
||||||
size={StyleConstants.Font.Size.M}
|
?.title
|
||||||
color={colors.primaryDefault}
|
: t('tabs.local.name')
|
||||||
style={{ marginLeft: StyleConstants.Spacing.S }}
|
}
|
||||||
strokeWidth={3}
|
/>
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
</>
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
@ -81,68 +92,15 @@ const TabLocal = React.memo(
|
|||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
children={() => (
|
children={() => (
|
||||||
<>
|
<Timeline
|
||||||
<Timeline
|
queryKey={queryKey}
|
||||||
queryKey={queryKey}
|
lookback='Following'
|
||||||
lookback='Following'
|
customProps={{
|
||||||
customProps={{
|
renderItem: ({ item }) => (
|
||||||
renderItem: ({ item }) => (
|
<TimelineDefault item={item} queryKey={queryKey} />
|
||||||
<TimelineDefault item={item} queryKey={queryKey} />
|
)
|
||||||
)
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
|
||||||
{listsShown ? (
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
position: 'absolute',
|
|
||||||
backgroundColor: colors.backgroundDefault,
|
|
||||||
width: '100%',
|
|
||||||
paddingVertical: StyleConstants.Spacing.S
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Pressable
|
|
||||||
style={{
|
|
||||||
padding: StyleConstants.Spacing.S * 1.5,
|
|
||||||
borderColor: colors.border,
|
|
||||||
borderTopWidth: StyleSheet.hairlineWidth,
|
|
||||||
borderBottomWidth: StyleSheet.hairlineWidth
|
|
||||||
}}
|
|
||||||
onPress={() => {
|
|
||||||
setQueryKey(['Timeline', { page: 'Following' }])
|
|
||||||
setListsShown(!listsShown)
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<CustomText fontSize='M' style={{ textAlign: 'center' }}>
|
|
||||||
Default
|
|
||||||
</CustomText>
|
|
||||||
</Pressable>
|
|
||||||
{lists?.map(list => (
|
|
||||||
<Pressable
|
|
||||||
style={{
|
|
||||||
padding: StyleConstants.Spacing.S,
|
|
||||||
borderColor: colors.border,
|
|
||||||
borderBottomWidth: StyleSheet.hairlineWidth
|
|
||||||
}}
|
|
||||||
onPress={() => {
|
|
||||||
setQueryKey([
|
|
||||||
'Timeline',
|
|
||||||
{ page: 'List', list: list.id }
|
|
||||||
])
|
|
||||||
setListsShown(!listsShown)
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<CustomText
|
|
||||||
key={list.id}
|
|
||||||
fontSize='M'
|
|
||||||
style={{ textAlign: 'center' }}
|
|
||||||
>
|
|
||||||
{list.title}
|
|
||||||
</CustomText>
|
|
||||||
</Pressable>
|
|
||||||
))}
|
|
||||||
</View>
|
|
||||||
) : null}
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{TabSharedRoot({ Stack })}
|
{TabSharedRoot({ Stack })}
|
||||||
|
@ -5,7 +5,7 @@ const audio = () => {
|
|||||||
log('log', 'audio', 'setting audio playback default options')
|
log('log', 'audio', 'setting audio playback default options')
|
||||||
Audio.setAudioModeAsync({
|
Audio.setAudioModeAsync({
|
||||||
playsInSilentModeIOS: true,
|
playsInSilentModeIOS: true,
|
||||||
interruptionModeIOS: InterruptionModeIOS.DuckOthers,
|
interruptionModeIOS: InterruptionModeIOS.MixWithOthers,
|
||||||
interruptionModeAndroid: InterruptionModeAndroid.DuckOthers
|
interruptionModeAndroid: InterruptionModeAndroid.DuckOthers
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import log from './log'
|
|||||||
const sentry = () => {
|
const sentry = () => {
|
||||||
log('log', 'Sentry', 'initializing')
|
log('log', 'Sentry', 'initializing')
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
|
// @ts-ignore
|
||||||
dsn: 'https://53348b60ff844d52886e90251b3a5f41@o917354.ingest.sentry.io/6410576',
|
dsn: 'https://53348b60ff844d52886e90251b3a5f41@o917354.ingest.sentry.io/6410576',
|
||||||
enableInExpoDevelopment: false,
|
enableInExpoDevelopment: false,
|
||||||
autoSessionTracking: true
|
autoSessionTracking: true
|
||||||
|
18
yarn.lock
18
yarn.lock
@ -1104,10 +1104,10 @@
|
|||||||
mv "~2"
|
mv "~2"
|
||||||
safe-json-stringify "~1"
|
safe-json-stringify "~1"
|
||||||
|
|
||||||
"@expo/cli@0.2.8":
|
"@expo/cli@0.2.9":
|
||||||
version "0.2.8"
|
version "0.2.9"
|
||||||
resolved "https://registry.yarnpkg.com/@expo/cli/-/cli-0.2.8.tgz#a5403d3abca844ee6489041e1af5aa39d842c954"
|
resolved "https://registry.yarnpkg.com/@expo/cli/-/cli-0.2.9.tgz#5d1bf563dd63b7c14fc7796d7fbb018a17f22f2e"
|
||||||
integrity sha512-8+LBXRKommR7Nmmp+anGNnTQaHyGQDvofcbujmo6pjGI99Z07F5lFyeZNL4h5ZJAMxgzjDfJeLxsRHzo0gy4pA==
|
integrity sha512-CUWtHH5yYEgEA4nf/k7LYW39FKORIB94ROvG+wuxZC4b5IrJs6DAsoFgunqUFFQZ7Jga2XPyx5+d27n2Ez3LCA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.14.0"
|
"@babel/runtime" "^7.14.0"
|
||||||
"@expo/code-signing-certificates" "^0.0.2"
|
"@expo/code-signing-certificates" "^0.0.2"
|
||||||
@ -4205,13 +4205,13 @@ expo-web-browser@^11.0.0, expo-web-browser@~11.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
compare-urls "^2.0.0"
|
compare-urls "^2.0.0"
|
||||||
|
|
||||||
expo@^46.0.6:
|
expo@^46.0.7:
|
||||||
version "46.0.6"
|
version "46.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/expo/-/expo-46.0.6.tgz#fd1bd159ef5d87196ab13502e86080052e3f573b"
|
resolved "https://registry.yarnpkg.com/expo/-/expo-46.0.7.tgz#ab4dd82584f18758777178bdf60d6098715c4b28"
|
||||||
integrity sha512-60fM7sqLppVd6jP73uWuqiLW7BbC20WxFRfAz+r4a7bRkrD/jUwvdQlVKIj9KpQQHWaDeuASj3rSGtU9CytPhg==
|
integrity sha512-vBn3/K2CxIVQvHUA6t1qn3ewsJvUvs5xTMFa7wbf275fj5OoiVTfH3qpbkj6K5msN6dMOQ7MqMjrsDmTnMrgqA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.14.0"
|
"@babel/runtime" "^7.14.0"
|
||||||
"@expo/cli" "0.2.8"
|
"@expo/cli" "0.2.9"
|
||||||
"@expo/vector-icons" "^13.0.0"
|
"@expo/vector-icons" "^13.0.0"
|
||||||
babel-preset-expo "~9.2.0"
|
babel-preset-expo "~9.2.0"
|
||||||
cross-spawn "^6.0.5"
|
cross-spawn "^6.0.5"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user