ZaStoGram_desktop/Telegram/SourceFiles/history/history_item_edition.h
John Preston a1f3dfb961 Replace anchored posts with ephemeral messages
Task: 2026/08/06/replace-anchored-posts-with-ephemeral-messages
2026-08-10 18:42:49 +04:00

65 lines
1.6 KiB
C++

/*
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 "history/history_item_reply_markup.h"
#include <memory>
namespace Data {
class Media;
} // namespace Data
namespace Iv {
struct RichPage;
} // namespace Iv
namespace Main {
class Session;
} // namespace Main
struct HistoryMessageEdition {
explicit HistoryMessageEdition() = default;
HistoryMessageEdition(
not_null<Main::Session*> session,
const MTPDmessage &message);
bool isEditHide = false;
bool isMediaUnread = false;
TimeId repeatPeriod = 0;
TimeId editDate = 0;
int views = -1;
int forwards = -1;
int ttl = 0;
bool useSameViews = false;
bool useSameForwards = false;
bool useSameReplies = false;
bool useSameMarkup = false;
bool useSameReactions = false;
bool useSameSuggest = false;
bool savePreviousMedia = false;
bool invertMedia = false;
TextWithEntities textWithEntities;
HistoryMessageMarkupData replyMarkup;
HistoryMessageRepliesData replies;
HistoryMessageSuggestInfo suggest;
std::shared_ptr<const Iv::RichPage> richPage;
const MTPMessageMedia *mtpMedia = nullptr;
const MTPMessageReactions *mtpReactions = nullptr;
const MTPFactCheck *mtpFactcheck = nullptr;
QString fromRank;
};
struct HistoryMessageContent {
TextWithEntities text;
std::unique_ptr<Data::Media> media;
HistoryMessageMarkupData markup;
std::shared_ptr<const Iv::RichPage> richPage;
bool invertMedia = false;
bool hideEdited = false;
};