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

Allow inserting links with custom text.

Fixes #4737.
This commit is contained in:
John Preston
2018-05-26 17:58:21 +03:00
parent cca46448fe
commit 07d8dafa5e
13 changed files with 603 additions and 97 deletions

View File

@@ -1319,10 +1319,12 @@ void SendFilesBox::AlbumPreview::mouseReleaseEvent(QMouseEvent *e) {
SendFilesBox::SendFilesBox(
QWidget*,
not_null<Window::Controller*> controller,
Storage::PreparedList &&list,
const TextWithTags &caption,
CompressConfirm compressed)
: _list(std::move(list))
: _controller(controller)
, _list(std::move(list))
, _compressConfirmInitial(compressed)
, _compressConfirm(compressed)
, _caption(
@@ -1579,6 +1581,8 @@ void SendFilesBox::setupCaption() {
_caption->setInstantReplaces(Ui::InstantReplaces::Default());
_caption->setInstantReplacesEnabled(Global::ReplaceEmojiValue());
_caption->setMarkdownReplacesEnabled(rpl::single(true));
_caption->setEditLinkCallback(
DefaultEditLinkCallback(_controller, _caption));
}
void SendFilesBox::captionResized() {