mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-24 03:25:03 +03:00
Adapt to RxSwift 6.2
This commit is contained in:
parent
507e2d6973
commit
f4626b7255
@ -65,16 +65,16 @@ extension NvimView: NSTouchBarDelegate, NSScrubberDataSource, NSScrubberDelegate
|
||||
.observe(on: MainScheduler.instance)
|
||||
.subscribe(onSuccess: { [weak self] in
|
||||
self?.tabsCache = $0
|
||||
|
||||
|
||||
guard let tabsControl = self?.getTabsControl() else { return }
|
||||
|
||||
|
||||
tabsControl.reloadData()
|
||||
|
||||
|
||||
let scrubberProportionalLayout = tabsControl.scrubberLayout as! NSScrubberProportionalLayout
|
||||
scrubberProportionalLayout.numberOfVisibleItems = tabsControl
|
||||
.numberOfItems > 0 ? tabsControl.numberOfItems : 1
|
||||
tabsControl.selectedIndex = self?.selectedTabIndex() ?? tabsControl.selectedIndex
|
||||
}, onError: { [weak self] error in
|
||||
}, onFailure: { [weak self] error in
|
||||
self?.eventsSubject.onNext(.apiError(msg: "Could not get all tabpages.", cause: error))
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
@ -86,12 +86,12 @@ extension NvimView: NSTouchBarDelegate, NSScrubberDataSource, NSScrubberDelegate
|
||||
.observe(on: MainScheduler.instance)
|
||||
.subscribe(onSuccess: { [weak self] in
|
||||
self?.tabsCache = $0
|
||||
|
||||
|
||||
guard let tabsControl = self?.getTabsControl() else { return }
|
||||
|
||||
|
||||
tabsControl.reloadData()
|
||||
tabsControl.selectedIndex = self?.selectedTabIndex() ?? tabsControl.selectedIndex
|
||||
}, onError: { error in
|
||||
}, onFailure: { error in
|
||||
self.eventsSubject.onNext(.apiError(msg: "Could not get all tabpages.", cause: error))
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
@ -121,7 +121,7 @@ extension NvimView: NSTouchBarDelegate, NSScrubberDataSource, NSScrubberDelegate
|
||||
let window = tab.currentWindow ?? tab.windows[0]
|
||||
self.api
|
||||
.setCurrentWin(window: RxNeovimApi.Window(window.handle))
|
||||
.subscribeOn(self.scheduler)
|
||||
.subscribe(on: self.scheduler)
|
||||
.subscribe(onError: { [weak self] error in
|
||||
self?.eventsSubject
|
||||
.onNext(.apiError(msg: "Could not set current window to \(window.handle).", cause: error))
|
||||
|
Loading…
Reference in New Issue
Block a user