mirror of
https://github.com/tooot-app/app
synced 2025-01-10 16:43:03 +01: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}
|
||||
queryKey={queryKey}
|
||||
rootQueryKey={rootQueryKey}
|
||||
disabled={highlighted}
|
||||
>
|
||||
<Pressable
|
||||
accessible={highlighted ? false : true}
|
||||
|
@ -59,7 +59,11 @@ const TimelineNotifications = React.memo(
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<TimelineContextMenu status={notification.status} queryKey={queryKey}>
|
||||
<TimelineContextMenu
|
||||
status={notification.status}
|
||||
queryKey={queryKey}
|
||||
disabled={highlighted}
|
||||
>
|
||||
<Pressable
|
||||
style={{
|
||||
padding: StyleConstants.Spacing.Global.PagePadding,
|
||||
|
@ -14,6 +14,7 @@ export interface Props {
|
||||
status?: Mastodon.Status
|
||||
queryKey?: QueryKeyTimeline
|
||||
rootQueryKey?: QueryKeyTimeline
|
||||
disabled?: boolean // Allowing toot to be copied when highlighted
|
||||
}
|
||||
|
||||
export const ContextMenuContext = createContext<ContextMenuAction[]>([])
|
||||
@ -23,6 +24,7 @@ const TimelineContextMenu: React.FC<Props & ContextMenuProps> = ({
|
||||
status,
|
||||
queryKey,
|
||||
rootQueryKey,
|
||||
disabled,
|
||||
...props
|
||||
}) => {
|
||||
if (!status || !queryKey) {
|
||||
@ -59,7 +61,9 @@ const TimelineContextMenu: React.FC<Props & ContextMenuProps> = ({
|
||||
rootQueryKey
|
||||
})
|
||||
|
||||
return (
|
||||
return disabled ? (
|
||||
<>{children}</>
|
||||
) : (
|
||||
<ContextMenuContext.Provider value={actions}>
|
||||
<ContextMenu
|
||||
actions={actions}
|
||||
|
Loading…
Reference in New Issue
Block a user