mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Temporarily disable highlight on release
This commit is contained in:
parent
1030e962a6
commit
1ba7fc3783
1 changed files with 10 additions and 12 deletions
|
|
@ -77,15 +77,13 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
|||
const focusedHighlightMousePos = useRef({ pageX: 0, pageY: 0 })
|
||||
|
||||
const [currentHighlightIdx, setCurrentHighlightIdx] = useState(0)
|
||||
const [focusedHighlight, setFocusedHighlight] = useState<
|
||||
Highlight | undefined
|
||||
>(undefined)
|
||||
const [focusedHighlight, setFocusedHighlight] =
|
||||
useState<Highlight | undefined>(undefined)
|
||||
|
||||
const [selectionData, setSelectionData] = useSelection(highlightLocations)
|
||||
|
||||
const [labelsTarget, setLabelsTarget] = useState<Highlight | undefined>(
|
||||
undefined
|
||||
)
|
||||
const [labelsTarget, setLabelsTarget] =
|
||||
useState<Highlight | undefined>(undefined)
|
||||
|
||||
const [
|
||||
confirmDeleteHighlightWithNoteId,
|
||||
|
|
@ -578,12 +576,12 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
|||
]
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
if (props.highlightOnRelease) {
|
||||
handleAction('create')
|
||||
setSelectionData(null)
|
||||
}
|
||||
}, [selectionData, setSelectionData, handleAction, props.highlightOnRelease])
|
||||
// useEffect(() => {
|
||||
// if (props.highlightOnRelease) {
|
||||
// handleAction('create')
|
||||
// setSelectionData(null)
|
||||
// }
|
||||
// }, [selectionData, setSelectionData, handleAction, props.highlightOnRelease])
|
||||
|
||||
const dispatchHighlightError = (action: string, error: unknown) => {
|
||||
if (props.isAppleAppEmbed) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue