Changeset View
Changeset View
Standalone View
Standalone View
src/client/client-model.hpp
| Show First 20 Lines • Show All 574 Lines • ▼ Show 20 Lines | struct SetAvatarUrlAction | ||||
| std::optional<std::string> avatarUrl; | std::optional<std::string> avatarUrl; | ||||
| }; | }; | ||||
| struct SetDisplayNameAction | struct SetDisplayNameAction | ||||
| { | { | ||||
| std::optional<std::string> displayName; | std::optional<std::string> displayName; | ||||
| }; | }; | ||||
| /// Load events from the storage into the model | |||||
| struct LoadEventsFromStorageAction | |||||
| { | |||||
| /// Map from room id to a list of | |||||
| /// loaded events that should be put into the timeline. From oldest to latest. | |||||
| immer::map<std::string, EventList> timelineEvents; | |||||
| /// Map from room id to a list of | |||||
| /// related events that should not be put into the timeline. From oldest to latest. | |||||
| /// There might be events in the storage that is needed to display | |||||
| /// existing events or room state (e.g. pinned events), but | |||||
| /// the storage may not know its place in the timeline. | |||||
| immer::map<std::string, EventList> relatedEvents; | |||||
| }; | |||||
| template<class Archive> | template<class Archive> | ||||
| void serialize(Archive &ar, ClientModel &m, std::uint32_t const version) | void serialize(Archive &ar, ClientModel &m, std::uint32_t const version) | ||||
| { | { | ||||
| bool dummySyncing{false}; | bool dummySyncing{false}; | ||||
| ar | ar | ||||
| & m.serverUrl | & m.serverUrl | ||||
| & m.userId | & m.userId | ||||
| & m.token | & m.token | ||||
| ▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines | |||||