Skip to content

Commit

Permalink
Don't stash the Tab Stash UI when stashing all open tabs
Browse files Browse the repository at this point in the history
This makes the "Stash all" button work correctly in "Open Tabs" mode -
it will ignore tabs that are not stashable regardless of whether the
user is in "Unstashed Tabs" or "Open Tabs" mode.
  • Loading branch information
josh-berry committed Jun 17, 2023
1 parent f9d5c48 commit ed08db7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/stash-list/window.vue
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,13 @@ export default defineComponent({
async stash(ev: MouseEvent | KeyboardEvent) {
this.attempt(async () => {
const model = this.model();
const stashable_children = this.tabs.filter(t => this.isValidChild(t));
// NOTE: isValidChild() is slightly different from
// stashableTabsInWindow()--we need to check both, because
// isValidChild() will exclude already-stashed tabs if the user is in
// "Unstashed Tabs" mode (i.e. ! this.showStashedTabs).
const stashable_children = model
.stashableTabsInWindow(this.targetWindow.unfiltered.id)
.filter(t => this.isValidChild(t));
if (stashable_children.length === 0) return;
await model.putItemsInFolder({
Expand Down

0 comments on commit ed08db7

Please sign in to comment.