File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -67,21 +67,22 @@ class AppDelegate: NSObject, NSApplicationDelegate {
6767 ConfigManager . shared
6868 . showNetSpeedIndicatorObservable
6969 . bind { [ unowned self] ( show) in
70- self . showNetSpeedIndicatorMenuItem. state = ( show! ) ? . on : . off
71- self . statusItem = NSStatusBar . system. statusItem ( withLength: show! ? 57 : 22 )
70+ self . showNetSpeedIndicatorMenuItem. state = ( show ?? true ) ? . on : . off
71+ self . statusItem = NSStatusBar . system. statusItem ( withLength: ( show ?? true ) ? 57 : 22 )
7272 self . statusItem. view = self . statusItemView
73- self . statusItemView. showSpeedContainer ( show: show! )
73+ self . statusItemView. showSpeedContainer ( show: ( show ?? true ) )
7474 self . statusItemView. statusItem = self . statusItem
7575 } . disposed ( by: disposeBag)
7676
7777 ConfigManager . shared
7878 . proxyPortAutoSetObservable
7979 . distinctUntilChanged ( )
8080 . bind { [ unowned self]
81- enable in
82- self . proxySettingMenuItem. state = ( enable ?? false ) ? . on : . off
81+ en in
82+ let enable = en ?? false
83+ self . proxySettingMenuItem. state = enable ? . on : . off
8384 let image =
84- NSImage ( named: NSImage . Name ( rawValue: " menu_icon " ) ) !. tint ( color: enable! ? NSColor . black : NSColor . gray)
85+ NSImage ( named: NSImage . Name ( rawValue: " menu_icon " ) ) !. tint ( color: enable ? NSColor . black : NSColor . gray)
8586 ( ( self . statusItem. view) as! StatusItemView ) . imageView. image = image
8687 } . disposed ( by: disposeBag)
8788
Original file line number Diff line number Diff line change 1919 <key >CFBundleShortVersionString </key >
2020 <string >1.0 </string >
2121 <key >CFBundleVersion </key >
22- <string >1.0 </string >
22+ <string >1.1 </string >
2323 <key >LSMinimumSystemVersion </key >
2424 <string >$(MACOSX_DEPLOYMENT_TARGET) </string >
2525 <key >LSUIElement </key >
You can’t perform that action at this time.
0 commit comments