mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
mobile frontend shows only the active tab
This commit is contained in:
parent
741dfaf2de
commit
263bff903c
@ -196,7 +196,11 @@ async function resolveNotePath(notePath) {
|
||||
async function getRunPath(notePath) {
|
||||
utils.assertArguments(notePath);
|
||||
|
||||
notePath = notePath.split("-")[0];
|
||||
notePath = notePath.split("-")[0].trim();
|
||||
|
||||
if (notePath.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const path = notePath.split("/").reverse();
|
||||
|
||||
@ -362,7 +366,7 @@ async function treeInitialized() {
|
||||
}
|
||||
}
|
||||
|
||||
const filteredTabs = [];
|
||||
let filteredTabs = [];
|
||||
|
||||
for (const openTab of openTabs) {
|
||||
const noteId = treeUtils.getNoteIdFromNotePath(openTab.notePath);
|
||||
@ -373,6 +377,11 @@ async function treeInitialized() {
|
||||
}
|
||||
}
|
||||
|
||||
if (utils.isMobile()) {
|
||||
// mobile frontend doesn't have tabs so show only the active tab
|
||||
filteredTabs = filteredTabs.filter(tab => tab.active);
|
||||
}
|
||||
|
||||
if (filteredTabs.length === 0) {
|
||||
filteredTabs.push({
|
||||
notePath: 'root',
|
||||
|
Loading…
x
Reference in New Issue
Block a user