1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-24 03:25:03 +03:00

Remove unnec' OS version checks

This commit is contained in:
Tae Won Ha 2019-04-06 15:21:00 +02:00
parent 9fd7b2bbc6
commit 08aafc21ee
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
2 changed files with 3 additions and 13 deletions

View File

@ -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"

View File

@ -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()
}
}