1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-24 11:37:32 +03:00
vimr/VimR/ToolsPrefReducer.swift
2017-05-01 17:15:21 +02:00

25 lines
434 B
Swift

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