mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-03 00:54:42 +03:00
27 lines
533 B
Swift
27 lines
533 B
Swift
/**
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
* See LICENSE
|
|
*/
|
|
|
|
import Foundation
|
|
|
|
class AdvancedPrefReducer {
|
|
|
|
typealias Pair = StateActionPair<AppState, AdvancedPref.Action>
|
|
|
|
func reduce(_ pair: Pair) -> Pair {
|
|
var state = pair.state
|
|
|
|
switch pair.action {
|
|
|
|
case let .setUseInteractiveZsh(value):
|
|
state.mainWindowTemplate.useInteractiveZsh = value
|
|
|
|
case let .setUseSnapshotUpdate(value):
|
|
state.useSnapshotUpdate = value
|
|
}
|
|
|
|
return StateActionPair(state: state, action: pair.action)
|
|
}
|
|
}
|