mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
web: open note history in new tab if active tab is pinned
This commit is contained in:
committed by
Abdullah Atta
parent
b636b09a96
commit
2eaf07118a
@@ -595,9 +595,18 @@ class EditorStore extends BaseStore<EditorStore> {
|
||||
|
||||
if (!oldContent || !currentContent) return;
|
||||
|
||||
const { getSession, addSession, sessions, activeTabId, tabs } = this.get();
|
||||
const {
|
||||
getSession,
|
||||
addSession,
|
||||
sessions,
|
||||
activeTabId,
|
||||
getActiveTab,
|
||||
tabs
|
||||
} = this.get();
|
||||
|
||||
const tabId = activeTabId ?? this.addTab();
|
||||
const tabId = getActiveTab()?.pinned
|
||||
? this.addTab(getId())
|
||||
: activeTabId || this.addTab(getId());
|
||||
const tab = tabs.find((t) => t.id === tabId);
|
||||
const activeSession = tab && getSession(tab.sessionId);
|
||||
const oldSession = sessions.find(
|
||||
|
||||
Reference in New Issue
Block a user