File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -398,26 +398,27 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
398398 const tab = event . target ;
399399 const group = tab . group ;
400400 if (
401- Services . prefs . getBoolPref ( "zen.folders.new -tabs-in-folder" )
402- && ! group ?. isZenFolder
403- && ! tab . owner
401+ Services . prefs . getBoolPref ( "zen.folders.owned -tabs-in-folder" ) &&
402+ group ?. isZenFolder &&
403+ ! tab . pinned
404404 ) {
405- const activeFolder = gBrowser . selectedTab ?. group ;
406- if ( activeFolder ?. isZenFolder ) {
407- gBrowser . pinTab ( tab ) ;
408- activeFolder . addTabs ( [ tab ] ) ;
409- return ;
410- }
411- }
412- if ( ! group ?. isZenFolder || tab . pinned ) {
413- return ;
414- }
415- // Edge case: In occations where we add a tab with an ownerTab
416- // inside a folder, the tab gets added into the folder in an
417- // unpinned state. We need to pin it and re-add it into the folder.
418- if ( Services . prefs . getBoolPref ( "zen.folders.owned-tabs-in-folder" ) ) {
405+ // Edge case: In occations where we add a tab with an ownerTab
406+ // inside a folder, the tab gets added into the folder in an
407+ // unpinned state. We need to pin it and re-add it into the folder.
419408 gBrowser . pinTab ( tab ) ;
420409 group . addTabs ( [ tab ] ) ;
410+ return ;
411+ }
412+ const activeFolder = gBrowser . selectedTab ?. group ;
413+ if (
414+ Services . prefs . getBoolPref ( "zen.folders.new-tabs-in-folder" ) &&
415+ ! group ?. isZenFolder &&
416+ ! tab . owner &&
417+ activeFolder ?. isZenFolder &&
418+ ! activeFolder ?. isLiveFolder &&
419+ ! activeFolder ?. hasAttribute ( "split-view-group" )
420+ ) {
421+ activeFolder . addTabs ( [ tab ] ) ;
421422 }
422423 }
423424
You can’t perform that action at this time.
0 commit comments