project panel: Fix preview tabs not working when enabled (#20416)

PR #20154 introduced a regression and essentially disabled preview tabs
in code.

This fixes it and restores the old preview tabs behavior.

Release Notes:

- Fixed preview tabs being disabled in code, even if they were enabled
in the settings.

Co-authored-by: Piotr <piotr@zed.dev>
This commit is contained in:
Thorsten Ball 2024-11-08 15:46:53 +01:00 committed by GitHub
parent 09675d43b3
commit edb89d8d11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2665,7 +2665,7 @@ impl ProjectPanel {
entry_id,
cx.modifiers().secondary(),
!preview_tabs_enabled || click_count > 1,
!preview_tabs_enabled && click_count == 1,
preview_tabs_enabled && click_count == 1,
cx,
);
}