Skip to content

Commit

Permalink
fix: navToLogseqBlock fails for long pages
Browse files Browse the repository at this point in the history
- `scrollToBlockInPage` has some issue with pages that are too long
Now when jumping to the block, Logseq "zooms" in on it
  • Loading branch information
e-zz committed Jul 13, 2024
1 parent 7cffbee commit 290970d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Agenda3/helpers/logseq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import type { AgendaEntity } from '@/types/entity'
export const navToLogseqBlock = (task: AgendaEntity, currentGraph?: { name: string }) => {
const uuid = task.recurringPast ? task.id.split('_')[0] : task.id
if (import.meta.env.VITE_MODE === 'plugin') {
logseq.Editor.scrollToBlockInPage(task.project.originalName, uuid)
// logseq.Editor.scrollToBlockInPage(task.project.originalName, uuid)
logseq.App.pushState('page', { name: uuid })
logseq.hideMainUI()
} else {
if (!currentGraph) return
Expand Down

0 comments on commit 290970d

Please sign in to comment.