2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Switch between pinned messages in chat.

This commit is contained in:
John Preston
2020-10-09 19:23:53 +03:00
parent ec35e3f081
commit b9f40e35cd
12 changed files with 466 additions and 69 deletions

View File

@@ -30,6 +30,7 @@ namespace Data {
class Session;
class PinnedMessages;
struct PinnedAroundId;
int PeerColorIndex(PeerId peerId);
int PeerColorIndex(int32 bareId);
@@ -331,8 +332,14 @@ public:
void setTopPinnedMessageId(MsgId messageId);
void clearPinnedMessages(MsgId lessThanId = ServerMaxMsgId);
void addPinnedMessage(MsgId messageId);
void addPinnedSlice(std::vector<MsgId> &&ids, MsgId from, MsgId till);
void addPinnedSlice(
std::vector<MsgId> &&ids,
MsgRange noSkipRange,
std::optional<int> count);
void removePinnedMessage(MsgId messageId);
Data::PinnedMessages *currentPinnedMessages() const {
return _pinnedMessages.get();
}
[[nodiscard]] bool canExportChatHistory() const;