mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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)
|
, _photo(photo)
|
||||||
, _spoiler(spoiler) {
|
, _spoiler(spoiler) {
|
||||||
parent->history()->owner().registerPhotoItem(_photo, parent);
|
parent->history()->owner().registerPhotoItem(_photo, parent);
|
||||||
|
|
||||||
|
if (_spoiler) {
|
||||||
|
Ui::PrepareImageSpoiler();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaPhoto::MediaPhoto(
|
MediaPhoto::MediaPhoto(
|
||||||
|
@ -753,6 +757,10 @@ MediaFile::MediaFile(
|
||||||
_emoji = emoji->text();
|
_emoji = emoji->text();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_spoiler) {
|
||||||
|
Ui::PrepareImageSpoiler();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaFile::~MediaFile() {
|
MediaFile::~MediaFile() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue