Skip to content

Commit 2d8ddd9

Browse files
- Updated recents tracking
1 parent 0bf478e commit 2d8ddd9

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

Sources/WelcomeWindow/Model/NSDocumentController+Extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ extension NSDocumentController {
188188
NSAlert(error: error).runModal()
189189
onError(error)
190190
} else {
191-
NSApp.activate(ignoringOtherApps: true)
192191
RecentsStore.documentOpened(at: url)
192+
NSApp.activate(ignoringOtherApps: true)
193193
onCompletion()
194194
}
195195
}

Sources/WelcomeWindow/Views/RecentsListView.swift

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,19 @@ public struct RecentsListView: View {
8484
removeRecentProjects()
8585
}
8686
.background {
87-
if colorScheme == .dark {
88-
Color(.black).opacity(0.075)
89-
.background(.thickMaterial)
90-
} else {
91-
Color(.white).opacity(0.6)
92-
.background(.regularMaterial)
87+
ZStack {
88+
if colorScheme == .dark {
89+
Color(.black).opacity(0.075)
90+
.background(.thickMaterial)
91+
} else {
92+
Color(.white).opacity(0.6)
93+
.background(.regularMaterial)
94+
}
95+
Color.clear
96+
.contentShape(Rectangle())
97+
.onTapGesture {
98+
selection.removeAll()
99+
}
93100
}
94101
}
95102
.background {

0 commit comments

Comments
 (0)