mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-24 03:25:03 +03:00
25 lines
409 B
Swift
25 lines
409 B
Swift
/**
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
* See LICENSE
|
|
*/
|
|
|
|
import Foundation
|
|
|
|
class PrefWindowReducer {
|
|
|
|
typealias Pair = StateActionPair<AppState, PrefWindow.Action>
|
|
|
|
func reduce(_ pair: Pair) -> Pair {
|
|
var state = pair.state
|
|
|
|
switch pair.action {
|
|
|
|
case .close:
|
|
state.preferencesOpen = Marked(false)
|
|
|
|
}
|
|
|
|
return StateActionPair(state: state, action: pair.action)
|
|
}
|
|
}
|