ZaStoGram_desktop/Telegram/SourceFiles/iv/iv_rich_page_quote_builder.h
John Preston 3f7841ac23 Built exact rich quote fragments from projection ranges.
Task: 2026/10/17/build-exact-rich-quote-fragments-from-projection-ranges
2026-10-20 17:07:50 +04:00

35 lines
700 B
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 "base/basic_types.h"
#include <optional>
namespace Main {
class Session;
} // namespace Main
namespace Iv {
struct RichPage;
struct RichQuoteRange;
struct BuiltRichQuote {
MTPVector<MTPRichText> fragments;
int offset = 0;
bool overflown = false;
};
[[nodiscard]] std::optional<BuiltRichQuote> BuildRichQuote(
not_null<Main::Session*> session,
const RichPage &page,
RichQuoteRange range,
int lengthLimit);
} // namespace Iv