1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-28 02:54:31 +03:00
vimr/VimR/OpenQuicklyTransformer.swift

28 lines
443 B
Swift
Raw Normal View History

2017-02-19 20:00:41 +03:00
/**
* 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
}
}
}
}