Changeset View
Changeset View
Standalone View
Standalone View
src/client/room/room-model.hpp
| Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | namespace Kazv | ||||
| bool operator==(const EventReader &a, const EventReader &b); | bool operator==(const EventReader &a, const EventReader &b); | ||||
| bool operator!=(const EventReader &a, const EventReader &b); | bool operator!=(const EventReader &a, const EventReader &b); | ||||
| struct AddStateEventsAction | struct AddStateEventsAction | ||||
| { | { | ||||
| immer::flex_vector<Event> stateEvents; | immer::flex_vector<Event> stateEvents; | ||||
| }; | }; | ||||
| struct AppendTimelineAction | |||||
| { | |||||
| immer::flex_vector<Event> events; | |||||
| }; | |||||
| struct PrependTimelineAction | |||||
| { | |||||
| immer::flex_vector<Event> events; | |||||
| std::string paginateBackToken; | |||||
| }; | |||||
| 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 187 Lines • ▼ Show 20 Lines | struct RoomModel | ||||
| * are gathered. | * are gathered. | ||||
| */ | */ | ||||
| void generateRelationships(EventList newEvents); | void generateRelationships(EventList newEvents); | ||||
| void regenerateRelationships(); | void regenerateRelationships(); | ||||
| using Action = std::variant< | using Action = std::variant< | ||||
| AddStateEventsAction, | AddStateEventsAction, | ||||
| AppendTimelineAction, | |||||
| PrependTimelineAction, | |||||
| AddToTimelineAction, | AddToTimelineAction, | ||||
| AddAccountDataAction, | AddAccountDataAction, | ||||
| ChangeMembershipAction, | ChangeMembershipAction, | ||||
| ChangeInviteStateAction, | ChangeInviteStateAction, | ||||
| AddEphemeralAction, | AddEphemeralAction, | ||||
| SetLocalDraftAction, | SetLocalDraftAction, | ||||
| SetRoomEncryptionAction, | SetRoomEncryptionAction, | ||||
| MarkMembersFullyLoadedAction, | MarkMembersFullyLoadedAction, | ||||
| ▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines | |||||