mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 12:12:54 +01:00
web: fix note not scrolling to selected match
This commit is contained in:
committed by
Abdullah Atta
parent
8c6476545b
commit
175cf92e74
@@ -239,7 +239,10 @@ const MemoizedEditorView = React.memo(EditorView, (prev, next) => {
|
||||
return (
|
||||
prev.session.id === next.session.id &&
|
||||
prev.session.type === next.session.type &&
|
||||
prev.session.needsHydration === next.session.needsHydration
|
||||
prev.session.needsHydration === next.session.needsHydration &&
|
||||
prev.session.activeBlockId === next.session.activeBlockId &&
|
||||
prev.session.activeSearchResultIndex ===
|
||||
next.session.activeSearchResultIndex
|
||||
);
|
||||
});
|
||||
function EditorView({
|
||||
|
||||
@@ -719,13 +719,12 @@ class EditorStore extends BaseStore<EditorStore> {
|
||||
const oldSessionOfNote = sessions.find(
|
||||
(s) => "note" in s && s.note.id === noteId && s.tabId === tabId
|
||||
);
|
||||
const sessionId = options.force
|
||||
? tabSessionHistory.add(tabId)
|
||||
: activeSession?.needsHydration ||
|
||||
activeSession?.type === "new" ||
|
||||
noteAlreadyOpened
|
||||
? activeSession.id
|
||||
: tabSessionHistory.add(tabId, oldSessionOfNote?.id);
|
||||
const sessionId =
|
||||
activeSession?.needsHydration ||
|
||||
activeSession?.type === "new" ||
|
||||
noteAlreadyOpened
|
||||
? activeSession.id
|
||||
: tabSessionHistory.add(tabId, oldSessionOfNote?.id);
|
||||
const isLocked = await db.vaults.itemExists(note);
|
||||
|
||||
if (note.conflicted) {
|
||||
|
||||
Reference in New Issue
Block a user