mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix reaction image caching after settings.
This commit is contained in:
parent
2edefbf93c
commit
9380c4bbc3
1 changed files with 2 additions and 7 deletions
|
@ -179,21 +179,16 @@ QImage Reactions::resolveImageFor(
|
||||||
}
|
}
|
||||||
image.setDevicePixelRatio(factor);
|
image.setDevicePixelRatio(factor);
|
||||||
};
|
};
|
||||||
if (size == ImageSize::Settings) {
|
|
||||||
if (set.settings.isNull() && set.icon) {
|
|
||||||
resolve(set.settings, st::reactionSettingsImage);
|
|
||||||
crl::async([icon = std::move(set.icon)]{});
|
|
||||||
}
|
|
||||||
return set.settings;
|
|
||||||
}
|
|
||||||
if (set.bottomInfo.isNull() && set.icon) {
|
if (set.bottomInfo.isNull() && set.icon) {
|
||||||
resolve(set.bottomInfo, st::reactionInfoImage);
|
resolve(set.bottomInfo, st::reactionInfoImage);
|
||||||
resolve(set.inlineList, st::reactionInlineImage);
|
resolve(set.inlineList, st::reactionInlineImage);
|
||||||
|
resolve(set.settings, st::reactionSettingsImage);
|
||||||
crl::async([icon = std::move(set.icon)]{});
|
crl::async([icon = std::move(set.icon)]{});
|
||||||
}
|
}
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case ImageSize::BottomInfo: return set.bottomInfo;
|
case ImageSize::BottomInfo: return set.bottomInfo;
|
||||||
case ImageSize::InlineList: return set.inlineList;
|
case ImageSize::InlineList: return set.inlineList;
|
||||||
|
case ImageSize::Settings: return set.settings;
|
||||||
}
|
}
|
||||||
Unexpected("ImageSize in Reactions::resolveImageFor.");
|
Unexpected("ImageSize in Reactions::resolveImageFor.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue