mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-04-27 07:40:55 -07:00
feat: not closing all opened tiddlers when click on workspace icon (old behavior).
This commit is contained in:
parent
d9991b044e
commit
0d01df03f4
1 changed files with 9 additions and 8 deletions
|
|
@ -52,22 +52,23 @@ export async function openWorkspaceTagTiddler(workspace: IWorkspace, service: IW
|
|||
window.service.native.log('debug', 'openWorkspaceTagTiddler', { workspace }),
|
||||
]);
|
||||
// if is a new main workspace, active its browser view first
|
||||
if (!isSubWiki && idToActive !== null && idToActive !== undefined && oldActiveWorkspace?.id !== idToActive) {
|
||||
await service.workspaceView.setActiveWorkspaceView(idToActive);
|
||||
if (!isSubWiki && idToActive) {
|
||||
if (oldActiveWorkspace?.id !== idToActive) {
|
||||
await service.workspaceView.setActiveWorkspaceView(idToActive);
|
||||
}
|
||||
// not closing all opened tiddlers when click on workspace icon (old behavior).
|
||||
// await service.wiki.requestWikiSendActionMessage('tm-home');
|
||||
return;
|
||||
}
|
||||
// is not a new main workspace
|
||||
// open tiddler in the active view
|
||||
if (isSubWiki) {
|
||||
if (!mainWikiID || !idToActive) {
|
||||
return;
|
||||
if (isSubWiki && mainWikiID) {
|
||||
if (oldActiveWorkspace?.id !== mainWikiID) {
|
||||
await service.workspaceView.setActiveWorkspaceView(mainWikiID);
|
||||
}
|
||||
await service.workspaceView.setActiveWorkspaceView(mainWikiID);
|
||||
if (tagName) {
|
||||
await service.wiki.wikiOperationInBrowser(WikiChannel.openTiddler, mainWikiID, [tagName]);
|
||||
}
|
||||
} else {
|
||||
await service.wiki.requestWikiSendActionMessage('tm-home');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue