mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Allow revealing spoilers in media viewer captions.
This commit is contained in:
parent
c67c53bcdf
commit
bcfe4ac4a3
1 changed files with 6 additions and 0 deletions
|
@ -2284,6 +2284,12 @@ void OverlayWidget::refreshCaption() {
|
||||||
: AddTimestampLinks(caption, duration, base)),
|
: AddTimestampLinks(caption, duration, base)),
|
||||||
Ui::ItemTextOptions(_message),
|
Ui::ItemTextOptions(_message),
|
||||||
context);
|
context);
|
||||||
|
if (_caption.hasSpoilers()) {
|
||||||
|
const auto weak = Ui::MakeWeak(widget());
|
||||||
|
_caption.setSpoilerLinkFilter([=](const ClickContext &context) {
|
||||||
|
return (weak != nullptr);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverlayWidget::refreshGroupThumbs() {
|
void OverlayWidget::refreshGroupThumbs() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue