Changeset View
Changeset View
Standalone View
Standalone View
src/client/room/room-model.hpp
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | namespace Kazv | ||||
| /// Go from the back of stateEvents to the beginning, | /// Go from the back of stateEvents to the beginning, | ||||
| /// adding the event to room state only if the room | /// adding the event to room state only if the room | ||||
| /// has no state event with that state key. | /// has no state event with that state key. | ||||
| struct MaybeAddStateEventsAction | struct MaybeAddStateEventsAction | ||||
| { | { | ||||
| immer::flex_vector<Event> stateEvents; | immer::flex_vector<Event> stateEvents; | ||||
| }; | }; | ||||
| /// Add events to the messages map, but not the timeline. | |||||
| /// Usually because their position in the timeline is not known. | |||||
| struct AddMessagesAction | |||||
| { | |||||
| EventList events; | |||||
| }; | |||||
| struct AddToTimelineAction | struct AddToTimelineAction | ||||
| { | { | ||||
| /// Events from oldest to latest | /// Events from oldest to latest | ||||
| immer::flex_vector<Event> events; | immer::flex_vector<Event> events; | ||||
| std::optional<std::string> prevBatch; | std::optional<std::string> prevBatch; | ||||
| std::optional<bool> limited; | std::optional<bool> limited; | ||||
| std::optional<std::string> gapEventId; | std::optional<std::string> gapEventId; | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | struct RoomModel | ||||
| */ | */ | ||||
| void addToUndecryptedEvents(EventList newEvents); | void addToUndecryptedEvents(EventList newEvents); | ||||
| void recalculateUndecryptedEvents(); | void recalculateUndecryptedEvents(); | ||||
| using Action = std::variant< | using Action = std::variant< | ||||
| AddStateEventsAction, | AddStateEventsAction, | ||||
| MaybeAddStateEventsAction, | MaybeAddStateEventsAction, | ||||
| AddMessagesAction, | |||||
| AddToTimelineAction, | AddToTimelineAction, | ||||
| AddAccountDataAction, | AddAccountDataAction, | ||||
| ChangeMembershipAction, | ChangeMembershipAction, | ||||
| ChangeInviteStateAction, | ChangeInviteStateAction, | ||||
| AddEphemeralAction, | AddEphemeralAction, | ||||
| SetLocalDraftAction, | SetLocalDraftAction, | ||||
| SetRoomEncryptionAction, | SetRoomEncryptionAction, | ||||
| MarkMembersFullyLoadedAction, | MarkMembersFullyLoadedAction, | ||||
| ▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines | |||||