mirror of
https://github.com/tooot-app/app
synced 2025-04-11 00:51:21 +02:00
parent
beb7ba9dc2
commit
72917c21f6
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tooot",
|
"name": "tooot",
|
||||||
"version": "4.5.1",
|
"version": "4.6.0",
|
||||||
"description": "tooot for Mastodon",
|
"description": "tooot for Mastodon",
|
||||||
"author": "xmflsct <me@xmflsct.com>",
|
"author": "xmflsct <me@xmflsct.com>",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
|
@ -81,15 +81,10 @@ const TimelineHeaderDefault = ({ queryKey, status, highlighted }: Props) => {
|
|||||||
{queryKey ? (
|
{queryKey ? (
|
||||||
<Pressable
|
<Pressable
|
||||||
accessibilityHint={t('accessibilityHint')}
|
accessibilityHint={t('accessibilityHint')}
|
||||||
style={{
|
style={{ flex: 1, flexBasis: StyleConstants.Font.Size.L }}
|
||||||
flex: 1,
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'center',
|
|
||||||
marginBottom: StyleConstants.Spacing.L
|
|
||||||
}}
|
|
||||||
hitSlop={StyleConstants.Font.Size.M}
|
|
||||||
>
|
>
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
|
style={{ flex: 1, alignItems: 'center' }}
|
||||||
dropdownMenuMode
|
dropdownMenuMode
|
||||||
actions={actions}
|
actions={actions}
|
||||||
onPress={({ nativeEvent: { index } }) => {
|
onPress={({ nativeEvent: { index } }) => {
|
||||||
@ -104,7 +99,6 @@ const TimelineHeaderDefault = ({ queryKey, status, highlighted }: Props) => {
|
|||||||
size={StyleConstants.Font.Size.L}
|
size={StyleConstants.Font.Size.L}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
style={{ width: '100%', height: '100%', paddingHorizontal: StyleConstants.Font.Size.M }}
|
|
||||||
/>
|
/>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
) : null}
|
) : null}
|
||||||
|
@ -51,15 +51,10 @@ const TimelineHeaderDefault = ({ queryKey, status, highlighted }: Props) => {
|
|||||||
{queryKey ? (
|
{queryKey ? (
|
||||||
<Pressable
|
<Pressable
|
||||||
accessibilityHint={t('accessibilityHint')}
|
accessibilityHint={t('accessibilityHint')}
|
||||||
style={{
|
style={{ flex: 1, flexBasis: StyleConstants.Font.Size.L }}
|
||||||
flex: 1,
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'center',
|
|
||||||
marginBottom: StyleConstants.Spacing.L
|
|
||||||
}}
|
|
||||||
hitSlop={StyleConstants.Font.Size.M}
|
|
||||||
>
|
>
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
|
style={{ flex: 1, alignItems: 'center' }}
|
||||||
dropdownMenuMode
|
dropdownMenuMode
|
||||||
actions={contextMenuContext}
|
actions={contextMenuContext}
|
||||||
onPress={() => {}}
|
onPress={() => {}}
|
||||||
@ -70,7 +65,6 @@ const TimelineHeaderDefault = ({ queryKey, status, highlighted }: Props) => {
|
|||||||
size={StyleConstants.Font.Size.L}
|
size={StyleConstants.Font.Size.L}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
style={{ paddingHorizontal: StyleConstants.Font.Size.M }}
|
|
||||||
/>
|
/>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
) : null}
|
) : null}
|
||||||
|
@ -3,10 +3,7 @@ import contextMenuInstance from '@components/ContextMenu/instance'
|
|||||||
import contextMenuShare from '@components/ContextMenu/share'
|
import contextMenuShare from '@components/ContextMenu/share'
|
||||||
import contextMenuStatus from '@components/ContextMenu/status'
|
import contextMenuStatus from '@components/ContextMenu/status'
|
||||||
import Icon from '@components/Icon'
|
import Icon from '@components/Icon'
|
||||||
import {
|
import { RelationshipIncoming, RelationshipOutgoing } from '@components/Relationship'
|
||||||
RelationshipIncoming,
|
|
||||||
RelationshipOutgoing
|
|
||||||
} from '@components/Relationship'
|
|
||||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
@ -37,18 +34,24 @@ const TimelineHeaderNotification = ({ queryKey, notification }: Props) => {
|
|||||||
url: status.url || status.uri
|
url: status.url || status.uri
|
||||||
})
|
})
|
||||||
: null
|
: null
|
||||||
const statusOnPress = status && contextMenuStatus({
|
const statusOnPress =
|
||||||
|
status &&
|
||||||
|
contextMenuStatus({
|
||||||
actions: contextMenuActions,
|
actions: contextMenuActions,
|
||||||
status: status,
|
status: status,
|
||||||
queryKey
|
queryKey
|
||||||
})
|
})
|
||||||
const accountOnPress = status && contextMenuAccount({
|
const accountOnPress =
|
||||||
|
status &&
|
||||||
|
contextMenuAccount({
|
||||||
actions: contextMenuActions,
|
actions: contextMenuActions,
|
||||||
type: 'status',
|
type: 'status',
|
||||||
queryKey,
|
queryKey,
|
||||||
id: status.account.id
|
id: status.account.id
|
||||||
})
|
})
|
||||||
const instanceOnPress = status && contextMenuInstance({
|
const instanceOnPress =
|
||||||
|
status &&
|
||||||
|
contextMenuInstance({
|
||||||
actions: contextMenuActions,
|
actions: contextMenuActions,
|
||||||
status: status,
|
status: status,
|
||||||
queryKey
|
queryKey
|
||||||
@ -64,14 +67,10 @@ const TimelineHeaderNotification = ({ queryKey, notification }: Props) => {
|
|||||||
if (notification.status) {
|
if (notification.status) {
|
||||||
return (
|
return (
|
||||||
<Pressable
|
<Pressable
|
||||||
style={{
|
style={{ flex: 1, flexBasis: StyleConstants.Font.Size.L }}
|
||||||
flex: 1,
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'center',
|
|
||||||
paddingBottom: StyleConstants.Spacing.S
|
|
||||||
}}
|
|
||||||
children={
|
children={
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
|
style={{ flex: 1, alignItems: 'center' }}
|
||||||
dropdownMenuMode
|
dropdownMenuMode
|
||||||
actions={contextMenuActions}
|
actions={contextMenuActions}
|
||||||
onPress={({ nativeEvent: { index } }) => {
|
onPress={({ nativeEvent: { index } }) => {
|
||||||
@ -91,7 +90,6 @@ const TimelineHeaderNotification = ({ queryKey, notification }: Props) => {
|
|||||||
size={StyleConstants.Font.Size.L}
|
size={StyleConstants.Font.Size.L}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
style={{ width: '100%', height: '100%' }}
|
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -104,21 +102,14 @@ const TimelineHeaderNotification = ({ queryKey, notification }: Props) => {
|
|||||||
<View style={{ flex: 1, flexDirection: 'row' }}>
|
<View style={{ flex: 1, flexDirection: 'row' }}>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
flex:
|
flex: notification.type === 'follow' || notification.type === 'follow_request' ? 1 : 4
|
||||||
notification.type === 'follow' ||
|
|
||||||
notification.type === 'follow_request'
|
|
||||||
? 1
|
|
||||||
: 4
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<HeaderSharedAccount
|
<HeaderSharedAccount
|
||||||
account={
|
account={notification.status ? notification.status.account : notification.account}
|
||||||
notification.status
|
{...((notification.type === 'follow' || notification.type === 'follow_request') && {
|
||||||
? notification.status.account
|
withoutName: true
|
||||||
: notification.account
|
})}
|
||||||
}
|
|
||||||
{...((notification.type === 'follow' ||
|
|
||||||
notification.type === 'follow_request') && { withoutName: true })}
|
|
||||||
/>
|
/>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
@ -129,28 +120,21 @@ const TimelineHeaderNotification = ({ queryKey, notification }: Props) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<HeaderSharedCreated
|
<HeaderSharedCreated
|
||||||
created_at={
|
created_at={notification.status?.created_at || notification.created_at}
|
||||||
notification.status?.created_at || notification.created_at
|
|
||||||
}
|
|
||||||
edited_at={notification.status?.edited_at}
|
edited_at={notification.status?.edited_at}
|
||||||
/>
|
/>
|
||||||
{notification.status?.visibility ? (
|
{notification.status?.visibility ? (
|
||||||
<HeaderSharedVisibility
|
<HeaderSharedVisibility visibility={notification.status.visibility} />
|
||||||
visibility={notification.status.visibility}
|
|
||||||
/>
|
|
||||||
) : null}
|
) : null}
|
||||||
<HeaderSharedMuted muted={notification.status?.muted} />
|
<HeaderSharedMuted muted={notification.status?.muted} />
|
||||||
<HeaderSharedApplication
|
<HeaderSharedApplication application={notification.status?.application} />
|
||||||
application={notification.status?.application}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
{ marginLeft: StyleConstants.Spacing.M },
|
{ marginLeft: StyleConstants.Spacing.M },
|
||||||
notification.type === 'follow' ||
|
notification.type === 'follow' || notification.type === 'follow_request'
|
||||||
notification.type === 'follow_request'
|
|
||||||
? { flexShrink: 1 }
|
? { flexShrink: 1 }
|
||||||
: { flex: 1 }
|
: { flex: 1 }
|
||||||
]}
|
]}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
import Icon from '@components/Icon'
|
import Icon from '@components/Icon'
|
||||||
import {
|
import { RelationshipIncoming, RelationshipOutgoing } from '@components/Relationship'
|
||||||
RelationshipIncoming,
|
|
||||||
RelationshipOutgoing
|
|
||||||
} from '@components/Relationship'
|
|
||||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
@ -36,14 +33,10 @@ const TimelineHeaderNotification = ({ notification }: Props) => {
|
|||||||
if (notification.status) {
|
if (notification.status) {
|
||||||
return (
|
return (
|
||||||
<Pressable
|
<Pressable
|
||||||
style={{
|
style={{ flex: 1, flexBasis: StyleConstants.Font.Size.L }}
|
||||||
flex: 1,
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'center',
|
|
||||||
paddingBottom: StyleConstants.Spacing.S
|
|
||||||
}}
|
|
||||||
children={
|
children={
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
|
style={{ flex: 1, alignItems: 'center' }}
|
||||||
dropdownMenuMode
|
dropdownMenuMode
|
||||||
actions={contextMenuContext}
|
actions={contextMenuContext}
|
||||||
onPress={() => {}}
|
onPress={() => {}}
|
||||||
@ -66,21 +59,14 @@ const TimelineHeaderNotification = ({ notification }: Props) => {
|
|||||||
<View style={{ flex: 1, flexDirection: 'row' }}>
|
<View style={{ flex: 1, flexDirection: 'row' }}>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
flex:
|
flex: notification.type === 'follow' || notification.type === 'follow_request' ? 1 : 4
|
||||||
notification.type === 'follow' ||
|
|
||||||
notification.type === 'follow_request'
|
|
||||||
? 1
|
|
||||||
: 4
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<HeaderSharedAccount
|
<HeaderSharedAccount
|
||||||
account={
|
account={notification.status ? notification.status.account : notification.account}
|
||||||
notification.status
|
{...((notification.type === 'follow' || notification.type === 'follow_request') && {
|
||||||
? notification.status.account
|
withoutName: true
|
||||||
: notification.account
|
})}
|
||||||
}
|
|
||||||
{...((notification.type === 'follow' ||
|
|
||||||
notification.type === 'follow_request') && { withoutName: true })}
|
|
||||||
/>
|
/>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
@ -91,28 +77,21 @@ const TimelineHeaderNotification = ({ notification }: Props) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<HeaderSharedCreated
|
<HeaderSharedCreated
|
||||||
created_at={
|
created_at={notification.status?.created_at || notification.created_at}
|
||||||
notification.status?.created_at || notification.created_at
|
|
||||||
}
|
|
||||||
edited_at={notification.status?.edited_at}
|
edited_at={notification.status?.edited_at}
|
||||||
/>
|
/>
|
||||||
{notification.status?.visibility ? (
|
{notification.status?.visibility ? (
|
||||||
<HeaderSharedVisibility
|
<HeaderSharedVisibility visibility={notification.status.visibility} />
|
||||||
visibility={notification.status.visibility}
|
|
||||||
/>
|
|
||||||
) : null}
|
) : null}
|
||||||
<HeaderSharedMuted muted={notification.status?.muted} />
|
<HeaderSharedMuted muted={notification.status?.muted} />
|
||||||
<HeaderSharedApplication
|
<HeaderSharedApplication application={notification.status?.application} />
|
||||||
application={notification.status?.application}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
{ marginLeft: StyleConstants.Spacing.M },
|
{ marginLeft: StyleConstants.Spacing.M },
|
||||||
notification.type === 'follow' ||
|
notification.type === 'follow' || notification.type === 'follow_request'
|
||||||
notification.type === 'follow_request'
|
|
||||||
? { flexShrink: 1 }
|
? { flexShrink: 1 }
|
||||||
: { flex: 1 }
|
: { flex: 1 }
|
||||||
]}
|
]}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user