mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +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)),
|
||||
Ui::ItemTextOptions(_message),
|
||||
context);
|
||||
if (_caption.hasSpoilers()) {
|
||||
const auto weak = Ui::MakeWeak(widget());
|
||||
_caption.setSpoilerLinkFilter([=](const ClickContext &context) {
|
||||
return (weak != nullptr);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void OverlayWidget::refreshGroupThumbs() {
|
||||
|
|
Loading…
Add table
Reference in a new issue