mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-10 00:58:37 +00:00
parent
6badc37dc3
commit
a606767ddc
@ -348,7 +348,7 @@
|
||||
TargetAttributes = {
|
||||
B082B24E205C7D8000BC04DC = {
|
||||
CreatedOnToolsVersion = 9.2;
|
||||
LastSwiftMigration = 1020;
|
||||
LastSwiftMigration = 1000;
|
||||
ProvisioningStyle = Manual;
|
||||
SystemCapabilities = {
|
||||
com.apple.Sandbox = {
|
||||
@ -358,7 +358,7 @@
|
||||
};
|
||||
B082B260205C7D8000BC04DC = {
|
||||
CreatedOnToolsVersion = 9.2;
|
||||
LastSwiftMigration = 1020;
|
||||
LastSwiftMigration = 1000;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -622,7 +622,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "MTMR/CBridge/TouchBarPrivateApi-Bridging.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@ -645,7 +645,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "MTMR/CBridge/TouchBarPrivateApi-Bridging.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@ -658,7 +658,7 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@ -673,7 +673,7 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@ -51,7 +51,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
|
||||
if frontmostApplicationIdentifier != nil {
|
||||
isBlockedApp = blacklistAppIdentifiers.firstIndex(of: frontmostApplicationIdentifier!) != nil
|
||||
isBlockedApp = blacklistAppIdentifiers.index(of: frontmostApplicationIdentifier!) != nil
|
||||
} else {
|
||||
isBlockedApp = false
|
||||
}
|
||||
@ -76,7 +76,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
@objc func toggleBlackListedApp(_: Any?) {
|
||||
let appIdentifier = TouchBarController.shared.frontmostApplicationIdentifier
|
||||
if appIdentifier != nil {
|
||||
if let index = TouchBarController.shared.blacklistAppIdentifiers.firstIndex(of: appIdentifier!) {
|
||||
if let index = TouchBarController.shared.blacklistAppIdentifiers.index(of: appIdentifier!) {
|
||||
TouchBarController.shared.blacklistAppIdentifiers.remove(at: index)
|
||||
} else {
|
||||
TouchBarController.shared.blacklistAppIdentifiers.append(appIdentifier!)
|
||||
|
||||
@ -146,7 +146,7 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
|
||||
}
|
||||
|
||||
func updateActiveApp() {
|
||||
if frontmostApplicationIdentifier != nil && blacklistAppIdentifiers.firstIndex(of: frontmostApplicationIdentifier!) != nil {
|
||||
if frontmostApplicationIdentifier != nil && blacklistAppIdentifiers.index(of: frontmostApplicationIdentifier!) != nil {
|
||||
dismissTouchBar()
|
||||
} else {
|
||||
presentTouchBar()
|
||||
|
||||
@ -72,7 +72,7 @@ class AppScrubberTouchBarItem: NSCustomTouchBarItem, NSScrubberDelegate, NSScrub
|
||||
func updateRunningApplication() {
|
||||
let newApplications = launchedApplications()
|
||||
|
||||
let index = newApplications.firstIndex {
|
||||
let index = newApplications.index {
|
||||
$0.bundleIdentifier == frontmostApplicationIdentifier
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ class AppScrubberTouchBarItem: NSCustomTouchBarItem, NSScrubberDelegate, NSScrub
|
||||
}
|
||||
} else {
|
||||
hf.tap(strong: 6)
|
||||
if let index = self.persistentAppIdentifiers.firstIndex(of: bundleIdentifier!) {
|
||||
if let index = self.persistentAppIdentifiers.index(of: bundleIdentifier!) {
|
||||
persistentAppIdentifiers.remove(at: index)
|
||||
} else {
|
||||
persistentAppIdentifiers.append(bundleIdentifier!)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user