mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-24 22:33:52 +03:00
Adapt NvimView to RxSwift 5
This commit is contained in:
parent
9040c812cc
commit
648236489c
4
Cartfile
4
Cartfile
@ -1,5 +1,5 @@
|
||||
# included as Framework
|
||||
github "ReactiveX/RxSwift" == 4.4.2
|
||||
github "ReactiveX/RxSwift" == 5.0.1
|
||||
github "PureLayout/PureLayout" == 3.1.4
|
||||
github "qvacua/Sparkle" == 1.21.3-qvacua
|
||||
github "qvacua/CocoaFontAwesome" "master"
|
||||
@ -7,7 +7,7 @@ github "qvacua/CocoaMarkdown" "master"
|
||||
github "qvacua/swifter" "nonpublic"
|
||||
github "a2/MessagePack.swift" == 3.0.0
|
||||
github "qvacua/ShortcutRecorder" "temporary"
|
||||
github "IBM-Swift/BlueSocket" == 1.0.45
|
||||
github "IBM-Swift/BlueSocket" == 1.0.46
|
||||
|
||||
# included directly
|
||||
github "eonil/FSEvents" "master"
|
||||
|
@ -1,7 +1,7 @@
|
||||
github "IBM-Swift/BlueSocket" "1.0.45"
|
||||
github "IBM-Swift/BlueSocket" "1.0.46"
|
||||
github "PureLayout/PureLayout" "v3.1.4"
|
||||
github "Quick/Nimble" "v8.0.1"
|
||||
github "ReactiveX/RxSwift" "4.4.2"
|
||||
github "ReactiveX/RxSwift" "5.0.1"
|
||||
github "a2/MessagePack.swift" "3.0.0"
|
||||
github "elegantchaos/DictionaryCoding" "1.0.6"
|
||||
github "eonil/FSEvents" "9723002bc2d9f596a56a63420deab30f9f670b86"
|
||||
|
@ -6,8 +6,7 @@
|
||||
import Foundation
|
||||
import RxSwift
|
||||
|
||||
extension PrimitiveSequence
|
||||
where Element == Never, TraitType == CompletableTrait {
|
||||
extension PrimitiveSequence where Element == Never, Trait == CompletableTrait {
|
||||
|
||||
func wait(
|
||||
onCompleted: (() -> Void)? = nil,
|
||||
|
@ -89,7 +89,7 @@ class UiBridge {
|
||||
// This will be completed in .nvimReady branch of handleMessage()
|
||||
return Disposables.create()
|
||||
})
|
||||
.timeout(timeout, scheduler: self.scheduler)
|
||||
.timeout(.seconds(timeout), scheduler: self.scheduler)
|
||||
}
|
||||
|
||||
func deleteCharacters(_ count: Int, andInputEscapedString string: String)
|
||||
@ -347,4 +347,4 @@ class UiBridge {
|
||||
}
|
||||
}
|
||||
|
||||
private let timeout = CFTimeInterval(5)
|
||||
private let timeout = 5
|
||||
|
@ -8,7 +8,9 @@ import RxSwift
|
||||
|
||||
extension ObservableType {
|
||||
|
||||
func compactMap<R>(_ transform: @escaping (E) throws -> R?) -> Observable<R> {
|
||||
func compactMap<R>(
|
||||
_ transform: @escaping (Element) throws -> R?
|
||||
) -> Observable<R> {
|
||||
return self
|
||||
.map(transform)
|
||||
.filter { $0 != nil }
|
||||
@ -16,8 +18,7 @@ extension ObservableType {
|
||||
}
|
||||
}
|
||||
|
||||
extension PrimitiveSequence
|
||||
where Element == Never, TraitType == CompletableTrait {
|
||||
extension PrimitiveSequence where Element == Never, Trait == CompletableTrait {
|
||||
|
||||
func andThen(using body: () -> Completable) -> Completable {
|
||||
return self.andThen(body())
|
||||
@ -59,7 +60,7 @@ extension PrimitiveSequence
|
||||
}
|
||||
}
|
||||
|
||||
extension PrimitiveSequence where TraitType == SingleTrait {
|
||||
extension PrimitiveSequence where Trait == SingleTrait {
|
||||
|
||||
static func fromSinglesToSingleOfArray(
|
||||
_ singles: [Single<Element>]
|
||||
@ -67,7 +68,6 @@ extension PrimitiveSequence where TraitType == SingleTrait {
|
||||
return Observable
|
||||
.merge(singles.map { $0.asObservable() })
|
||||
.toArray()
|
||||
.asSingle()
|
||||
}
|
||||
|
||||
func flatMapCompletable(
|
||||
|
Loading…
Reference in New Issue
Block a user