Support mobile

This commit is contained in:
Jesse Hines 2025-05-25 20:44:05 -04:00
parent 85b9a1c636
commit 91fd99d9c8
No known key found for this signature in database
2 changed files with 3 additions and 4 deletions

View file

@ -6,5 +6,5 @@
"description": "Add settings to open in new tab by default and prevent duplicate tabs.",
"author": "jesse-r-s-hines",
"authorUrl": "https://github.com/jesse-r-s-hines",
"isDesktopOnly": true
"isDesktopOnly": false
}

View file

@ -1,7 +1,6 @@
import {
App, Plugin, PluginSettingTab, Setting, Workspace, WorkspaceLeaf, WorkspaceRoot, WorkspaceFloating,
View, TFile, PaneType, WorkspaceTabs,
WorkspaceItem,
View, TFile, PaneType, WorkspaceTabs, WorkspaceItem, Platform,
} from 'obsidian';
import { PaneTypePatch, TabGroup } from './types';
import * as monkeyAround from 'monkey-around';
@ -203,7 +202,7 @@ export default class OpenTabSettingsPlugin extends Plugin {
let dest: TabGroup|undefined;
let index = 0;
if (this.settings.openNewTabsInOtherTabGroup) {
if (this.settings.openNewTabsInOtherTabGroup && !Platform.isPhone) {
// check if there is a split in the same window
const otherTabGroup = this.getAllTabGroups(activeLeaf.getRoot()).filter(g => g !== activeTabGroup).at(-1);
if (otherTabGroup) {