conversations-classic-ios/ConversationsClassic/AppCore/Reducers/ChatsReducer.swift
2024-06-20 07:43:49 +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
}
}
}