Simplify logic updating pinned tab count (#32310)
Just a tiny improvement to clean up the logic Release Notes: - N/A
This commit is contained in:
parent
05ac9f1f84
commit
037df8cec5
1 changed files with 2 additions and 8 deletions
|
@ -2925,15 +2925,9 @@ impl Pane {
|
|||
let ix = if moved_right { ix - 1 } else { ix };
|
||||
let is_pinned_in_to_pane = this.is_tab_pinned(ix);
|
||||
|
||||
if (was_pinned_in_from_pane && is_pinned_in_to_pane)
|
||||
|| (!was_pinned_in_from_pane && !is_pinned_in_to_pane)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if is_pinned_in_to_pane {
|
||||
if !was_pinned_in_from_pane && is_pinned_in_to_pane {
|
||||
this.pinned_tab_count += 1;
|
||||
} else {
|
||||
} else if was_pinned_in_from_pane && !is_pinned_in_to_pane {
|
||||
this.pinned_tab_count -= 1;
|
||||
}
|
||||
} else if this.items.len() >= to_pane_old_length {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue