diff --git a/NvimView/NvimView/NvimView+TouchBar.swift b/NvimView/NvimView/NvimView+TouchBar.swift index b6516734..254b1abd 100644 --- a/NvimView/NvimView/NvimView+TouchBar.swift +++ b/NvimView/NvimView/NvimView+TouchBar.swift @@ -7,7 +7,6 @@ import Cocoa import RxSwift -@available(OSX 10.12.2, *) extension NvimView: NSTouchBarDelegate, NSScrubberDataSource, NSScrubberDelegate { override public func makeTouchBar() -> NSTouchBar? { @@ -137,11 +136,8 @@ extension NvimView: NSTouchBarDelegate, NSScrubberDataSource, NSScrubberDelegate } } -@available(OSX 10.12.2, *) private let touchBarIdentifier = NSTouchBar.CustomizationIdentifier("com.qvacua.VimR.NvimView.touchBar") -@available(OSX 10.12.2, *) private let touchBarTabSwitcherIdentifier = NSTouchBarItem.Identifier("com.qvacua.VimR.NvimView.touchBar.tabSwitcher") -@available(OSX 10.12.2, *) private let touchBarTabSwitcherItem = "com.qvacua.VimR.NvimView.touchBar.tabSwitcher.item" diff --git a/NvimView/NvimView/NvimView+UiBridge.swift b/NvimView/NvimView/NvimView+UiBridge.swift index 39ad78e2..5196a9d2 100644 --- a/NvimView/NvimView/NvimView+UiBridge.swift +++ b/NvimView/NvimView/NvimView+UiBridge.swift @@ -576,9 +576,7 @@ extension NvimView { } .subscribe(onSuccess: { self.eventsSubject.onNext(.bufferWritten($0)) - if #available(OSX 10.12.2, *) { - self.updateTouchBarTab() - } + self.updateTouchBarTab() }, onError: { error in self.bridgeLogger.error("Could not get the buffer \(handle): \(error)") self.eventsSubject.onNext( @@ -594,9 +592,7 @@ extension NvimView { .filter { $0.apiBuffer.handle == handle } .subscribe(onSuccess: { self.eventsSubject.onNext(.newCurrentBuffer($0)) - if #available(OSX 10.12.2, *) { - self.updateTouchBarTab() - } + self.updateTouchBarTab() }, onError: { error in self.bridgeLogger.error("Could not get the current buffer: \(error)") self.eventsSubject.onNext( @@ -608,9 +604,7 @@ extension NvimView { private func bufferListChanged() { self.eventsSubject.onNext(.bufferListChanged) - if #available(OSX 10.12.2, *) { - self.updateTouchBarCurrentBuffer() - } + self.updateTouchBarCurrentBuffer() } }