2023-10-11 04:53:59 +03:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "data/data_statistics.h"
|
|
|
|
|
|
|
|
namespace Info::Statistics {
|
|
|
|
|
2023-11-22 05:29:31 +03:00
|
|
|
struct RecentPostId final {
|
|
|
|
FullMsgId messageId;
|
|
|
|
FullStoryId storyId;
|
|
|
|
|
|
|
|
[[nodiscard]] bool valid() const {
|
|
|
|
return messageId || storyId;
|
|
|
|
}
|
|
|
|
explicit operator bool() const {
|
|
|
|
return valid();
|
|
|
|
}
|
|
|
|
friend inline auto operator<=>(RecentPostId, RecentPostId) = default;
|
|
|
|
friend inline bool operator==(RecentPostId, RecentPostId) = default;
|
|
|
|
};
|
|
|
|
|
2023-10-11 04:53:59 +03:00
|
|
|
struct SavedState final {
|
|
|
|
Data::AnyStatistics stats;
|
2023-11-22 05:29:31 +03:00
|
|
|
base::flat_map<RecentPostId, QImage> recentPostPreviews;
|
2023-10-11 05:10:09 +03:00
|
|
|
Data::PublicForwardsSlice publicForwardsFirstSlice;
|
2023-11-09 00:53:31 +03:00
|
|
|
int recentPostsExpanded = 0;
|
2023-10-11 04:53:59 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Info::Statistics
|