Fix userpics in "Who Read" menu.

This commit is contained in:
John Preston 2023-07-26 12:00:43 +04:00
parent 37ab65d952
commit 5dc35bc75f
1 changed files with 7 additions and 4 deletions

View File

@ -165,8 +165,9 @@ Action::Action(
+ _st.itemStyle.font->height
+ st::defaultWhoRead.itemPadding.bottom()) {
const auto parent = parentMenu->menu();
const auto checkAppeared = [=, now = crl::now()] {
_appeared = (crl::now() - now) >= parentMenu->st().duration;
const auto delay = anim::Disabled() ? 0 : parentMenu->st().duration;
const auto checkAppeared = [=, now = crl::now()](bool force = false) {
_appeared = force || ((crl::now() - now) >= delay);
};
setAcceptBoth(true);
@ -224,8 +225,10 @@ Action::Action(
enableMouseSelecting();
base::call_delayed(parentMenu->st().duration, this, [=] {
checkAppeared();
updateUserpicsFromContent();
if (!_appeared) {
checkAppeared(true);
updateUserpicsFromContent();
}
});
}