mirror of
https://github.com/tooot-app/app
synced 2025-03-02 10:38:15 +01:00
commit
44374ce091
@ -4,7 +4,7 @@
|
||||
"native": "220214",
|
||||
"major": 3,
|
||||
"minor": 5,
|
||||
"patch": 2,
|
||||
"patch": 3,
|
||||
"expo": "44.0.0"
|
||||
},
|
||||
"description": "tooot app for Mastodon",
|
||||
|
@ -37,7 +37,7 @@ const TimelineAvatar = React.memo(
|
||||
})
|
||||
})}
|
||||
onPress={onPress}
|
||||
uri={{ original: account.avatar, static: account.avatar_static }}
|
||||
uri={{ original: account?.avatar, static: account?.avatar_static }}
|
||||
dimension={{
|
||||
width: StyleConstants.Avatar.M,
|
||||
height: StyleConstants.Avatar.M
|
||||
|
@ -11,7 +11,6 @@ import accountInitialState from '@screens/Tabs/Shared/Account/utils/initialState
|
||||
import accountReducer from '@screens/Tabs/Shared/Account/utils/reducer'
|
||||
import { useProfileQuery } from '@utils/queryHooks/profile'
|
||||
import { getInstanceActive } from '@utils/slices/instancesSlice'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import React, { useReducer, useRef } from 'react'
|
||||
import Animated, {
|
||||
useAnimatedScrollHandler,
|
||||
@ -50,7 +49,6 @@ const TabMeRoot: React.FC = () => {
|
||||
keyboardShouldPersistTaps='handled'
|
||||
onScroll={onScroll}
|
||||
scrollEventThrottle={16}
|
||||
style={{ marginBottom: StyleConstants.Spacing.L }}
|
||||
>
|
||||
{instanceActive !== -1 ? (
|
||||
<MyInfo account={data} />
|
||||
|
@ -21,7 +21,8 @@ const Logout: React.FC = () => {
|
||||
content={t('me.root.logout.button')}
|
||||
style={{
|
||||
marginHorizontal: StyleConstants.Spacing.Global.PagePadding * 2,
|
||||
marginTop: StyleConstants.Spacing.Global.PagePadding
|
||||
marginTop: StyleConstants.Spacing.Global.PagePadding,
|
||||
marginBottom: StyleConstants.Spacing.Global.PagePadding * 2
|
||||
}}
|
||||
destructive
|
||||
onPress={() =>
|
||||
|
@ -6,7 +6,6 @@ import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import { FlatList } from 'react-native'
|
||||
import { InfiniteQueryObserver, useQueryClient } from 'react-query'
|
||||
import * as Sentry from 'sentry-expo'
|
||||
|
||||
const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||
route: {
|
||||
@ -45,25 +44,15 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||
scrolled.current = true
|
||||
const pointer = flattenData.findIndex(({ id }) => id === toot.id)
|
||||
if (pointer < 1) return
|
||||
Sentry.Native.setContext('Scroll to Index', {
|
||||
type: 'original',
|
||||
index: pointer,
|
||||
itemsLength: flattenData.length,
|
||||
id: toot.id,
|
||||
flattenData: flattenData.map(({ id }) => id)
|
||||
})
|
||||
try {
|
||||
setTimeout(() => {
|
||||
console.log('scrolling')
|
||||
flRef.current?.scrollToIndex({
|
||||
index: pointer,
|
||||
viewOffset: 100
|
||||
})
|
||||
}, 500)
|
||||
} catch (err) {
|
||||
if (Math.random() < 0.05) {
|
||||
Sentry.Native.captureException(err)
|
||||
}
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -74,12 +63,6 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||
error => {
|
||||
const offset = error.averageItemLength * error.index
|
||||
flRef.current?.scrollToOffset({ offset })
|
||||
Sentry.Native.setContext('Scroll to Index', {
|
||||
type: 'onScrollToIndexFailed',
|
||||
index: error.index,
|
||||
itemsLength,
|
||||
id: toot.id
|
||||
})
|
||||
try {
|
||||
error.index < itemsLength &&
|
||||
setTimeout(
|
||||
@ -90,11 +73,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
||||
}),
|
||||
500
|
||||
)
|
||||
} catch (err) {
|
||||
if (Math.random() < 0.05) {
|
||||
Sentry.Native.captureException(err)
|
||||
}
|
||||
}
|
||||
} catch {}
|
||||
},
|
||||
[itemsLength]
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user