another.im-ios/ConversationsClassic/AppCore/Reducers/ConversationReducer.swift
2024-06-24 15:28:26 +02:00

15 lines
396 B
Swift

extension ConversationState {
static func reducer(state: inout ConversationState, action: ConversationAction) {
switch action {
case .makeConversationActive(let chat):
state.currentChat = chat
case .messageForCurrentConversationReceived(let message):
state.currentMessages.append(message)
default:
break
}
}
}