Skip to content

Commit 7ae6acd

Browse files
committed
fixed a small issue
now the Touch Bar shows the time format that you are editing
1 parent ba12c30 commit 7ae6acd

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

ClockBar.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,15 +392,15 @@
392392
CODE_SIGN_IDENTITY = "-";
393393
CODE_SIGN_STYLE = Automatic;
394394
COMBINE_HIDPI_IMAGES = YES;
395-
CURRENT_PROJECT_VERSION = 20200212;
395+
CURRENT_PROJECT_VERSION = 20200213;
396396
DEVELOPMENT_TEAM = 2U23P5CPX2;
397397
ENABLE_HARDENED_RUNTIME = NO;
398398
INFOPLIST_FILE = "ClockBar/Supporting Files/Info.plist";
399399
LD_RUNPATH_SEARCH_PATHS = (
400400
"$(inherited)",
401401
"@executable_path/../Frameworks",
402402
);
403-
MARKETING_VERSION = 1.2.0;
403+
MARKETING_VERSION = 1.2.1;
404404
PRODUCT_BUNDLE_IDENTIFIER = cn.licardo.ClockBar;
405405
PRODUCT_NAME = "$(TARGET_NAME)";
406406
SWIFT_OBJC_BRIDGING_HEADER = "ClockBar/TouchBar/ClockBar-Bridging-Header.h";
@@ -424,15 +424,15 @@
424424
CODE_SIGN_IDENTITY = "-";
425425
CODE_SIGN_STYLE = Automatic;
426426
COMBINE_HIDPI_IMAGES = YES;
427-
CURRENT_PROJECT_VERSION = 20200212;
427+
CURRENT_PROJECT_VERSION = 20200213;
428428
DEVELOPMENT_TEAM = 2U23P5CPX2;
429429
ENABLE_HARDENED_RUNTIME = NO;
430430
INFOPLIST_FILE = "ClockBar/Supporting Files/Info.plist";
431431
LD_RUNPATH_SEARCH_PATHS = (
432432
"$(inherited)",
433433
"@executable_path/../Frameworks",
434434
);
435-
MARKETING_VERSION = 1.2.0;
435+
MARKETING_VERSION = 1.2.1;
436436
PRODUCT_BUNDLE_IDENTIFIER = cn.licardo.ClockBar;
437437
PRODUCT_NAME = "$(TARGET_NAME)";
438438
SWIFT_OBJC_BRIDGING_HEADER = "ClockBar/TouchBar/ClockBar-Bridging-Header.h";

ClockBar.xcodeproj/xcshareddata/xcschemes/ClockBar.xcscheme

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
buildConfiguration = "Debug"
3535
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3636
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37-
language = "en"
3837
launchStyle = "0"
3938
useCustomWorkingDirectory = "NO"
4039
ignoresPersistentStateOnLaunch = "NO"
37 Bytes
Binary file not shown.

ClockBar/AppDelegate.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSTextFieldDelegate {
6464
}
6565

6666
func controlTextDidChange(_ obj: Notification) {
67-
Defaults[.time1] = time1Text.stringValue
68-
Defaults[.time2] = time2Text.stringValue
67+
if Defaults[.time1] != time1Text.stringValue {
68+
Defaults[.time1] = time1Text.stringValue
69+
Defaults[.shouldShowTime1] = true
70+
} else if Defaults[.time2] != time2Text.stringValue {
71+
Defaults[.time2] = time2Text.stringValue
72+
Defaults[.shouldShowTime1] = false
73+
}
6974
showTime()
7075
}
7176

@@ -86,8 +91,8 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSTextFieldDelegate {
8691
}
8792

8893
@objc func changeTime() {
89-
showTime()
9094
Defaults[.shouldShowTime1] = !Defaults[.shouldShowTime1]
95+
showTime()
9196
}
9297

9398
// update time

appcast.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<channel>
44
<title>ClockBar</title>
55
<item>
6-
<title>1.2.0</title>
7-
<pubDate>周三, 12 2月 2020 14:20:41 +0800</pubDate>
6+
<title>1.2.1</title>
7+
<pubDate>周三, 12 2月 2020 22:40:41 +0800</pubDate>
88
<sparkle:minimumSystemVersion>10.13</sparkle:minimumSystemVersion>
9-
<enclosure url="https://github.com/L1cardo/ClockBar/releases/download/v1.2.0/ClockBar.dmg" sparkle:version="20200212" sparkle:shortVersionString="1.2.0" length="6217052" type="application/octet-stream" sparkle:edSignature="BAjG9KK5ZP51QvFie5cf3Nlt2RLfaze8d7hAIdRmSgBuY3mKf6+uoKxmZGA75LeQoBeVScK5fAHRANyDP/WLCg=="/>
9+
<enclosure url="https://github.com/L1cardo/ClockBar/releases/download/v1.2.1/ClockBar.dmg" sparkle:version="20200213" sparkle:shortVersionString="1.2.1" length="6217035" type="application/octet-stream" sparkle:edSignature="M4nLHHmJylNdJ0MQd9/XGxmRJEctOl8YCSwKWZ6gR39OxBsNoHxsWW2nelW6AObYIlBSrvAbirXG7QoJxzzMAg=="/>
1010
</item>
1111
</channel>
1212
</rss>

0 commit comments

Comments
 (0)