mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 02:54:31 +03:00
28 lines
443 B
Swift
28 lines
443 B
Swift
|
/**
|
||
|
* Tae Won Ha - http://taewon.de - @hataewon
|
||
|
* See LICENSE
|
||
|
*/
|
||
|
|
||
|
import Foundation
|
||
|
import RxSwift
|
||
|
|
||
|
class OpenQuicklyTransformer: Transformer {
|
||
|
|
||
|
typealias Pair = StateActionPair<AppState, MainWindow.Action>
|
||
|
|
||
|
func transform(_ source: Observable<Pair>) -> Observable<Pair> {
|
||
|
return source.map { pair in
|
||
|
|
||
|
switch pair.action {
|
||
|
|
||
|
case .openQuickly:
|
||
|
return pair
|
||
|
|
||
|
default:
|
||
|
return pair
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|