diff --git a/Menu Bar Dock.xcodeproj/project.pbxproj b/Menu Bar Dock.xcodeproj/project.pbxproj index d1775a9..5f4e51e 100644 --- a/Menu Bar Dock.xcodeproj/project.pbxproj +++ b/Menu Bar Dock.xcodeproj/project.pbxproj @@ -779,7 +779,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 24; + CURRENT_PROJECT_VERSION = 25; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = T34G959ZG8; ENABLE_HARDENED_RUNTIME = YES; @@ -789,7 +789,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 4.4; + MARKETING_VERSION = 4.5; PRODUCT_BUNDLE_IDENTIFIER = com.ethansk.MenuBarDock; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -807,7 +807,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 24; + CURRENT_PROJECT_VERSION = 25; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = T34G959ZG8; ENABLE_HARDENED_RUNTIME = YES; @@ -817,7 +817,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 4.4; + MARKETING_VERSION = 4.5; PRODUCT_BUNDLE_IDENTIFIER = com.ethansk.MenuBarDock; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/MenuBarDock/MenuBarItem.swift b/MenuBarDock/MenuBarItem.swift index a285756..9816418 100644 --- a/MenuBarDock/MenuBarItem.swift +++ b/MenuBarDock/MenuBarItem.swift @@ -67,6 +67,11 @@ class MenuBarItem { func reset() { self.app = nil + if let button = statusItem.button { + for subview in button.subviews { + subview.removeFromSuperview() + } + } } private func initButton() { diff --git a/MenuBarDock/MenuBarItems.swift b/MenuBarDock/MenuBarItems.swift index a4ce77f..c0a722b 100644 --- a/MenuBarDock/MenuBarItems.swift +++ b/MenuBarDock/MenuBarItems.swift @@ -83,7 +83,7 @@ class MenuBarItems { if #available(OSX 10.12, *) { if userPrefsDataSource.preserveAppOrder == false { - item.statusItem.isVisible = false // this prevents the item from remembering its position. Thanks Apple. + item.statusItem.isVisible = false // this prevents the item from remembering its position Thanks Apple. } } }