Skip to content

Commit

Permalink
🔀 Merge pull request #343 from `MrKai77/globally-close-preview-window…
Browse files Browse the repository at this point in the history
…-occupied`

🐛 Don't show preview window when disabled
  • Loading branch information
MrKai77 authored Apr 30, 2024
2 parents 8eb3171 + 1ee1df7 commit bd72a6e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Loop/Managers/WindowDragManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,16 @@ class WindowDragManager {

print("Window snapping direction changed: \(direction)")

self.previewController.open(screen: screen, window: nil)
DispatchQueue.main.async {
NotificationCenter.default.post(
name: Notification.Name.updateUIDirection,
object: nil,
userInfo: ["action": WindowAction(self.direction)]
)
if Defaults[.previewVisibility] {
self.previewController.open(screen: screen, window: nil)

DispatchQueue.main.async {
NotificationCenter.default.post(
name: Notification.Name.updateUIDirection,
object: nil,
userInfo: ["action": WindowAction(self.direction)]
)
}
}
} else {
self.direction = .noAction
Expand Down

0 comments on commit bd72a6e

Please sign in to comment.