mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +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)),
|
||||
Ui::ItemTextOptions(_message),
|
||||
context);
|
||||
if (_caption.hasSpoilers()) {
|
||||
const auto weak = Ui::MakeWeak(widget());
|
||||
_caption.setSpoilerLinkFilter([=](const ClickContext &context) {
|
||||
return (weak != nullptr);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void OverlayWidget::refreshGroupThumbs() {
|
||||
|
Reference in New Issue
Block a user