Allow links in default multiline toasts.
This commit is contained in:
parent
b97c0cadcb
commit
3cce0655d1
2 changed files with 6 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ base::weak_ptr<Toast::Instance> ShowMultilineToast(
|
||||||
? args.duration
|
? args.duration
|
||||||
: Ui::Toast::kDefaultDuration),
|
: Ui::Toast::kDefaultDuration),
|
||||||
.multiline = true,
|
.multiline = true,
|
||||||
|
.filter = std::move(args.filter),
|
||||||
};
|
};
|
||||||
return args.parentOverride
|
return args.parentOverride
|
||||||
? Ui::Toast::Show(args.parentOverride, std::move(config))
|
? Ui::Toast::Show(args.parentOverride, std::move(config))
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/text/text_entity.h"
|
#include "ui/text/text_entity.h"
|
||||||
#include "base/weak_ptr.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 Ui {
|
||||||
namespace Toast {
|
namespace Toast {
|
||||||
class Instance;
|
class Instance;
|
||||||
|
|
@ -19,6 +23,7 @@ struct MultilineToastArgs {
|
||||||
QWidget *parentOverride = nullptr;
|
QWidget *parentOverride = nullptr;
|
||||||
TextWithEntities text;
|
TextWithEntities text;
|
||||||
crl::time duration = 0;
|
crl::time duration = 0;
|
||||||
|
ClickHandlerFilter filter;
|
||||||
};
|
};
|
||||||
|
|
||||||
base::weak_ptr<Toast::Instance> ShowMultilineToast(
|
base::weak_ptr<Toast::Instance> ShowMultilineToast(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue