mirror of
https://github.com/tooot-app/app
synced 2025-05-10 23:09:08 +02:00
Allowing toot to be copied when highlighted
This commit is contained in:
parent
8d0fc94303
commit
d5104bf6f8
@ -78,6 +78,7 @@ const TimelineDefault: React.FC<Props> = ({
|
|||||||
status={actualStatus}
|
status={actualStatus}
|
||||||
queryKey={queryKey}
|
queryKey={queryKey}
|
||||||
rootQueryKey={rootQueryKey}
|
rootQueryKey={rootQueryKey}
|
||||||
|
disabled={highlighted}
|
||||||
>
|
>
|
||||||
<Pressable
|
<Pressable
|
||||||
accessible={highlighted ? false : true}
|
accessible={highlighted ? false : true}
|
||||||
|
@ -59,7 +59,11 @@ const TimelineNotifications = React.memo(
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TimelineContextMenu status={notification.status} queryKey={queryKey}>
|
<TimelineContextMenu
|
||||||
|
status={notification.status}
|
||||||
|
queryKey={queryKey}
|
||||||
|
disabled={highlighted}
|
||||||
|
>
|
||||||
<Pressable
|
<Pressable
|
||||||
style={{
|
style={{
|
||||||
padding: StyleConstants.Spacing.Global.PagePadding,
|
padding: StyleConstants.Spacing.Global.PagePadding,
|
||||||
|
@ -14,6 +14,7 @@ export interface Props {
|
|||||||
status?: Mastodon.Status
|
status?: Mastodon.Status
|
||||||
queryKey?: QueryKeyTimeline
|
queryKey?: QueryKeyTimeline
|
||||||
rootQueryKey?: QueryKeyTimeline
|
rootQueryKey?: QueryKeyTimeline
|
||||||
|
disabled?: boolean // Allowing toot to be copied when highlighted
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ContextMenuContext = createContext<ContextMenuAction[]>([])
|
export const ContextMenuContext = createContext<ContextMenuAction[]>([])
|
||||||
@ -23,6 +24,7 @@ const TimelineContextMenu: React.FC<Props & ContextMenuProps> = ({
|
|||||||
status,
|
status,
|
||||||
queryKey,
|
queryKey,
|
||||||
rootQueryKey,
|
rootQueryKey,
|
||||||
|
disabled,
|
||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
if (!status || !queryKey) {
|
if (!status || !queryKey) {
|
||||||
@ -59,7 +61,9 @@ const TimelineContextMenu: React.FC<Props & ContextMenuProps> = ({
|
|||||||
rootQueryKey
|
rootQueryKey
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return disabled ? (
|
||||||
|
<>{children}</>
|
||||||
|
) : (
|
||||||
<ContextMenuContext.Provider value={actions}>
|
<ContextMenuContext.Provider value={actions}>
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
actions={actions}
|
actions={actions}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user