Fix crash in toasts.
This commit is contained in:
parent
04e6428fec
commit
a755fa391e
1 changed files with 6 additions and 4 deletions
|
|
@ -40,10 +40,12 @@ Widget::Widget(QWidget *parent, const Config &config)
|
||||||
_multiline ? config.text : TextUtilities::SingleLine(config.text),
|
_multiline ? config.text : TextUtilities::SingleLine(config.text),
|
||||||
toastOptions,
|
toastOptions,
|
||||||
config.textContext ? config.textContext(this) : std::any());
|
config.textContext ? config.textContext(this) : std::any());
|
||||||
const auto weak = Ui::MakeWeak(this);
|
if (_text.hasSpoilers()) {
|
||||||
_text.setSpoilerLinkFilter([=](const ClickContext &context) {
|
const auto weak = Ui::MakeWeak(this);
|
||||||
return (weak != nullptr);
|
_text.setSpoilerLinkFilter([=](const ClickContext &context) {
|
||||||
});
|
return (weak != nullptr);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
_processMouse = _text.hasLinks() || _text.hasSpoilers();
|
_processMouse = _text.hasLinks() || _text.hasSpoilers();
|
||||||
if (_processMouse) {
|
if (_processMouse) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue