Skip to content

Commit ebd61b2

Browse files
authored
Merge pull request #230 from datlechin/fix/inspector-border-and-lag
fix: inspector border overlap and laggy toggle
2 parents 0192d5b + 204dd09 commit ebd61b2

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Inspector separator no longer bleeds into toolbar area with default connection color (#228)
13+
- Inspector toggle no longer lags due to synchronous UserDefaults writes during animation (#229)
14+
1015
### Added
1116

1217
- Direct `.tableplugin` bundle installation via file picker, Finder double-click, and drag-and-drop

TablePro/Models/UI/RightPanelState.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ import os
1313
@MainActor @Observable final class RightPanelState {
1414
private static let isPresentedKey = "com.TablePro.rightPanel.isPresented"
1515
private static let isPresentedChangedNotification = Notification.Name("com.TablePro.rightPanel.isPresentedChanged")
16-
1716
private var isSyncing = false
1817
@ObservationIgnored private let _didTeardown = OSAllocatedUnfairLock(initialState: false)
1918

2019
var isPresented: Bool {
2120
didSet {
2221
guard !isSyncing else { return }
23-
UserDefaults.standard.set(isPresented, forKey: Self.isPresentedKey)
24-
NotificationCenter.default.post(name: Self.isPresentedChangedNotification, object: self)
22+
DispatchQueue.main.async { [self] in
23+
UserDefaults.standard.set(self.isPresented, forKey: Self.isPresentedKey)
24+
NotificationCenter.default.post(name: Self.isPresentedChangedNotification, object: self)
25+
}
2526
}
2627
}
2728

TablePro/Views/Main/MainContentView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,6 @@ private struct ToolbarTintModifier: ViewModifier {
861861
func body(content: Content) -> some View {
862862
if connectionColor.isDefault {
863863
content
864-
.toolbarBackground(.hidden, for: .windowToolbar)
865864
} else {
866865
content
867866
.toolbarBackground(connectionColor.color.opacity(0.12), for: .windowToolbar)

0 commit comments

Comments
 (0)