isolated tab type default handling

This commit is contained in:
Fabian Freund
2026-05-02 06:20:11 +02:00
parent e4853281f1
commit 94b9b9cceb
7 changed files with 66 additions and 26 deletions
@@ -88,9 +88,7 @@ TabViewReorderResult? buildTabViewReorderResult({
? withoutMovingItem[insertIndex].tabId
: null;
if (targetBeforeId != null && moveBlockIds.contains(targetBeforeId)) {
logger.t(
'reorder refused: drop target is inside the moving subtree',
);
logger.t('reorder refused: drop target is inside the moving subtree');
return null;
}
@@ -392,30 +392,37 @@ class _BrowserViewState extends ConsumerState<BrowserView>
next.whenData((sharedContent) async {
final settings = ref.read(generalSettingsWithDefaultsProvider);
switch (settings.tabIntentOpenSetting) {
switch (settings.effectiveTabIntentOpenSetting) {
case TabIntentOpenSetting.regular:
case TabIntentOpenSetting.private:
case TabIntentOpenSetting.isolated:
await ref
.read(engineReadyStateProvider.notifier)
.waitUntilReady();
final tabMode = switch (settings.effectiveTabIntentOpenSetting) {
TabIntentOpenSetting.private => TabMode.private,
TabIntentOpenSetting.isolated => TabMode.newIsolated(),
_ => TabMode.regular,
};
switch (sharedContent) {
case SharedUrl():
final containerSelection = await _resolveContainerSelection(
ref,
sharedContent.contextId,
sharedContent.containerMode,
);
final containerSelection =
settings.effectiveTabIntentOpenSetting ==
TabIntentOpenSetting.isolated
? const TabContainerSelection.unassigned()
: await _resolveContainerSelection(
ref,
sharedContent.contextId,
sharedContent.containerMode,
);
await ref
.read(tabRepositoryProvider.notifier)
.addTab(
url: sharedContent.url,
tabMode:
settings.tabIntentOpenSetting ==
TabIntentOpenSetting.private
? TabMode.private
: TabMode.regular,
tabMode: tabMode,
launchedFromIntent: true,
selectTab: true,
containerSelection: containerSelection,
@@ -429,11 +436,7 @@ class _BrowserViewState extends ConsumerState<BrowserView>
.read(tabRepositoryProvider.notifier)
.addTab(
url: bang?.getTemplateUrl(sharedContent.text),
tabMode:
settings.tabIntentOpenSetting ==
TabIntentOpenSetting.private
? TabMode.private
: TabMode.regular,
tabMode: tabMode,
launchedFromIntent: true,
selectTab: true,
);