mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 15:05:56 +00:00
Allow revealing spoilers in media viewer captions.
This commit is contained in:
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user