feat: first blacklist can now match prefixes instead of full ids

This commit is contained in:
Louis Pontoise authored and lwouis committed 2020-09-05 04:01:32 +09:00
1 parent e6ded6c79b
commit 10693d0346
1 file changed
+1 -1
+1 -1
View File
@@ -126,7 +126,7 @@ class Windows {
static func refreshIfWindowShouldBeShownToTheUser(_ window: Window, _ screen: NSScreen) {
window.shouldShowTheUser =
!(window.application.runningApplication.bundleIdentifier.flatMap { Preferences.dontShowBlacklist.contains($0) } ?? false) &&
!(window.application.runningApplication.bundleIdentifier.flatMap { id in Preferences.dontShowBlacklist.contains { id.hasPrefix($0) } } ?? false) &&
!(Preferences.appsToShow[App.app.shortcutIndex] == .active && window.application.runningApplication != NSWorkspace.shared.frontmostApplication) &&
!(!Preferences.showHiddenWindows[App.app.shortcutIndex] && window.isHidden) &&
((!Preferences.hideWindowlessApps && window.isWindowlessApp) ||