another.im-ios/ConversationsClassic/AppCore/Reducers/ChatsReducer.swift

15 lines
323 B
Swift
Raw Normal View History

2024-06-19 15:15:27 +00:00
extension ChatsState {
static func reducer(state: inout ChatsState, action: ChatsAction) {
switch action {
case .chatsListUpdated(let chats):
state.chats = chats
2024-06-20 05:43:49 +00:00
case .chatStarted(let chat):
state.currentChat = chat
2024-06-19 15:15:27 +00:00
default:
break
}
}
}