Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions Sources/VoidBar/Model/NotchViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,26 @@ final class NotchViewModel: ObservableObject {
// first letter typed is also the last one that lands. Their panes
// observe them directly, and the header counter refreshes anyway,
// because the list is only ever re-read on the way into the tab.
// Stores that power the Dynamic Island must always forward their
// changes — the island is visible when the panel is *closed*.
for child in [
media.objectWillChange,
timer.objectWillChange,
weather.objectWillChange
] {
child
.sink { [weak self] _ in
self?.objectWillChange.send()
}
.store(in: &cancellables)
}

// The remaining stores only matter when the panel is open.
for child in [
shelf.objectWillChange,
clipboard.objectWillChange,
calendar.objectWillChange,
timer.objectWillChange,
monitor.objectWillChange,
weather.objectWillChange
monitor.objectWillChange
] {
child
.sink { [weak self] _ in
Expand Down
5 changes: 4 additions & 1 deletion Sources/VoidBar/UI/DynamicIslandView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ struct DynamicIslandView: View {
))
}
}
.frame(width: notchWidth + 120, height: notchHeight)
// Extra width so the pill can sit fully outside the notch area.
// The 6pt trailing padding keeps it clear of the notch's rounded corner.
.padding(.trailing, 6)
.frame(width: notchWidth + 140, height: notchHeight)
.animation(.spring(response: 0.35, dampingFraction: 0.8), value: pillKind)
}

Expand Down