Allow links in default multiline toasts.

This commit is contained in:
John Preston 2022-05-09 17:09:05 +04:00
parent b97c0cadcb
commit 3cce0655d1
2 changed files with 6 additions and 0 deletions

View file

@ -21,6 +21,7 @@ base::weak_ptr<Toast::Instance> ShowMultilineToast(
? args.duration
: Ui::Toast::kDefaultDuration),
.multiline = true,
.filter = std::move(args.filter),
};
return args.parentOverride
? Ui::Toast::Show(args.parentOverride, std::move(config))

View file

@ -10,6 +10,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/text/text_entity.h"
#include "base/weak_ptr.h"
class ClickHandler;
using ClickHandlerPtr = std::shared_ptr<ClickHandler>;
using ClickHandlerFilter = Fn<bool(const ClickHandlerPtr&, Qt::MouseButton)>;
namespace Ui {
namespace Toast {
class Instance;
@ -19,6 +23,7 @@ struct MultilineToastArgs {
QWidget *parentOverride = nullptr;
TextWithEntities text;
crl::time duration = 0;
ClickHandlerFilter filter;
};
base::weak_ptr<Toast::Instance> ShowMultilineToast(