another.im-ios/old/AppCore/Reducers/ChatsReducer.swift
2024-08-11 13:09:29 +02:00

15 lines
323 B
Swift

extension ChatsState {
static func reducer(state: inout ChatsState, action: ChatsAction) {
switch action {
case .chatsListUpdated(let chats):
state.chats = chats
case .chatStarted(let chat):
state.currentChat = chat
default:
break
}
}
}