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

Support markdown and replaces in media captions.

This commit is contained in:
John Preston
2018-05-24 16:03:21 +03:00
parent 6f6ec217e3
commit 5e7642b42a
22 changed files with 133 additions and 63 deletions

View File

@@ -178,7 +178,7 @@ FileLoadResult::FileLoadResult(
TaskId taskId,
uint64 id,
const FileLoadTo &to,
const QString &caption,
const TextWithTags &caption,
std::shared_ptr<SendingAlbum> album)
: taskId(taskId)
, id(id)
@@ -193,7 +193,7 @@ FileLoadTask::FileLoadTask(
std::unique_ptr<FileMediaInformation> information,
SendMediaType type,
const FileLoadTo &to,
const QString &caption,
const TextWithTags &caption,
std::shared_ptr<SendingAlbum> album)
: _id(rand_value<uint64>())
, _to(to)
@@ -210,7 +210,7 @@ FileLoadTask::FileLoadTask(
int32 duration,
const VoiceWaveform &waveform,
const FileLoadTo &to,
const QString &caption)
const TextWithTags &caption)
: _id(rand_value<uint64>())
, _to(to)
, _content(voice)

View File

@@ -189,7 +189,7 @@ struct FileLoadResult {
TaskId taskId,
uint64 id,
const FileLoadTo &to,
const QString &caption,
const TextWithTags &caption,
std::shared_ptr<SendingAlbum> album);
TaskId taskId;
@@ -217,7 +217,7 @@ struct FileLoadResult {
MTPDocument document;
PreparedPhotoThumbs photoThumbs;
QString caption;
TextWithTags caption;
void setFileData(const QByteArray &filedata) {
if (filedata.isEmpty()) {
@@ -281,14 +281,14 @@ public:
std::unique_ptr<FileMediaInformation> information,
SendMediaType type,
const FileLoadTo &to,
const QString &caption,
const TextWithTags &caption,
std::shared_ptr<SendingAlbum> album = nullptr);
FileLoadTask(
const QByteArray &voice,
int32 duration,
const VoiceWaveform &waveform,
const FileLoadTo &to,
const QString &caption);
const TextWithTags &caption);
uint64 fileid() const {
return _id;
@@ -328,7 +328,7 @@ private:
int32 _duration = 0;
VoiceWaveform _waveform;
SendMediaType _type;
QString _caption;
TextWithTags _caption;
std::shared_ptr<FileLoadResult> _result;