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

GH-405 Rename some generic types

This commit is contained in:
Tae Won Ha 2017-04-22 16:03:45 +02:00
parent 849dfe104c
commit c422035dca
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -96,7 +96,7 @@ class Context {
self.actionSourceForAppState()
.reduce(by: AdvancedPrefReducer())
.filterMapPair()
)
)
.merge()
.apply(to: prefService.forPrefPanes)
.subscribe(onNext: self.emitAppState)
@ -141,15 +141,16 @@ class Context {
}
}
fileprivate func actionSourceForAppState<T>() -> Observable<StateActionPair<AppState, T>> {
fileprivate func actionSourceForAppState<ActionType>() -> Observable<StateActionPair<AppState, ActionType>> {
return self.actionEmitter.observable
.mapOmittingNil { $0 as? T }
.mapOmittingNil { $0 as? ActionType }
.map { self.appStateActionPair(for: $0) }
}
fileprivate func actionSourceForMainWindow<T>() -> Observable<StateActionPair<UuidState<MainWindow.State>, T>> {
fileprivate func actionSourceForMainWindow<ActionType>()
-> Observable<StateActionPair<UuidState<MainWindow.State>, ActionType>> {
return self.actionEmitter.observable
.mapOmittingNil { $0 as? UuidAction<T> }
.mapOmittingNil { $0 as? UuidAction<ActionType> }
.mapOmittingNil { self.mainWindowStateActionPair(for: $0) }
}
@ -171,7 +172,7 @@ class Context {
extension Observable {
fileprivate func reduce<T:Reducer>(by reducer: T) -> Observable<Element> where T.Pair == Element {
fileprivate func reduce<R:Reducer>(by reducer: R) -> Observable<Element> where R.Pair == Element {
return reducer.reduce(self)
}