We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aac6509 commit d0910a2Copy full SHA for d0910a2
Core/Sources/ChatGPTChatTab/ChatPanel.swift
@@ -137,11 +137,11 @@ struct ChatPanelMessages: View {
137
138
func trackScrollWheel() {
139
NSApplication.shared.publisher(for: \.currentEvent)
140
- .filter { _ in isEnabled }
141
- .filter { event in event?.type == .scrollWheel }
+ .compactMap { $0 }
+ .filter { isEnabled && $0.type == .scrollWheel }
142
.sink { event in
143
- guard isEnabled, isPinnedToBottom else { return }
144
- let delta = event?.deltaY ?? 0
+ guard isPinnedToBottom else { return }
+ let delta = event.deltaY
145
let scrollUp = delta > 0
146
if scrollUp {
147
isPinnedToBottom = false
0 commit comments