1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fix visual bugs

Somehow the `onError` of `react-native-fast-image` doesn't work anymore as expected. Maybe because the underlying `SDWebImage` is being patched to other versions.
This commit is contained in:
xmflsct
2022-12-20 10:47:33 +01:00
parent bb02fadc16
commit dab2ca060d
5 changed files with 54 additions and 82 deletions

View File

@ -13,6 +13,8 @@ import { useQueryClient } from '@tanstack/react-query'
import { useSelector } from 'react-redux'
import { checkInstanceFeature } from '@utils/slices/instancesSlice'
import { StyleConstants } from '@utils/styles/constants'
import { View } from 'react-native'
import { useRoute } from '@react-navigation/native'
export interface Props {
id: Mastodon.Account['id']
@ -122,9 +124,12 @@ const RelationshipOutgoing: React.FC<Props> = ({ id }: Props) => {
}
}
const { name } = useRoute()
const isPageNotifications = name === 'Tab-Notifications-Root'
return (
<>
{canFollowNotify && query.data?.following ? (
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
{!isPageNotifications && canFollowNotify && query.data?.following ? (
<Button
type='icon'
content={query.data.notifying ? 'BellOff' : 'Bell'}
@ -151,7 +156,7 @@ const RelationshipOutgoing: React.FC<Props> = ({ id }: Props) => {
loading={query.isLoading || mutation.isLoading}
disabled={query.isError || query.data?.blocked_by}
/>
</>
</View>
)
}