mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix a crash in media spoilers.
This commit is contained in:
parent
1bb6b07515
commit
43f0da683f
1 changed files with 8 additions and 0 deletions
|
@ -540,6 +540,10 @@ MediaPhoto::MediaPhoto(
|
|||
, _photo(photo)
|
||||
, _spoiler(spoiler) {
|
||||
parent->history()->owner().registerPhotoItem(_photo, parent);
|
||||
|
||||
if (_spoiler) {
|
||||
Ui::PrepareImageSpoiler();
|
||||
}
|
||||
}
|
||||
|
||||
MediaPhoto::MediaPhoto(
|
||||
|
@ -753,6 +757,10 @@ MediaFile::MediaFile(
|
|||
_emoji = emoji->text();
|
||||
}
|
||||
}
|
||||
|
||||
if (_spoiler) {
|
||||
Ui::PrepareImageSpoiler();
|
||||
}
|
||||
}
|
||||
|
||||
MediaFile::~MediaFile() {
|
||||
|
|
Loading…
Add table
Reference in a new issue