1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-29 16:56:40 +03:00
vimr/VimR/PrefWindowReducer.swift
2017-04-30 09:25:15 +02:00

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)
}
}