1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 23:36:08 +03:00
vimr/VimR/ToolsPrefReducer.swift

25 lines
434 B
Swift
Raw Normal View History

/**
* Tae Won Ha - http://taewon.de - @hataewon
* See LICENSE
*/
import Foundation
class ToolsPrefReducer {
typealias Pair = StateActionPair<AppState, ToolsPref.Action>
func reduce(_ pair: Pair) -> Pair {
var state = pair.state
switch pair.action {
case let .setActiveTools(tools):
state.mainWindowTemplate.activeTools = tools
}
return StateActionPair(state: state, action: pair.action)
}
}