Fix userpics in "Who Read" menu.
This commit is contained in:
parent
37ab65d952
commit
5dc35bc75f
|
@ -165,8 +165,9 @@ Action::Action(
|
||||||
+ _st.itemStyle.font->height
|
+ _st.itemStyle.font->height
|
||||||
+ st::defaultWhoRead.itemPadding.bottom()) {
|
+ st::defaultWhoRead.itemPadding.bottom()) {
|
||||||
const auto parent = parentMenu->menu();
|
const auto parent = parentMenu->menu();
|
||||||
const auto checkAppeared = [=, now = crl::now()] {
|
const auto delay = anim::Disabled() ? 0 : parentMenu->st().duration;
|
||||||
_appeared = (crl::now() - now) >= parentMenu->st().duration;
|
const auto checkAppeared = [=, now = crl::now()](bool force = false) {
|
||||||
|
_appeared = force || ((crl::now() - now) >= delay);
|
||||||
};
|
};
|
||||||
|
|
||||||
setAcceptBoth(true);
|
setAcceptBoth(true);
|
||||||
|
@ -224,8 +225,10 @@ Action::Action(
|
||||||
enableMouseSelecting();
|
enableMouseSelecting();
|
||||||
|
|
||||||
base::call_delayed(parentMenu->st().duration, this, [=] {
|
base::call_delayed(parentMenu->st().duration, this, [=] {
|
||||||
checkAppeared();
|
if (!_appeared) {
|
||||||
updateUserpicsFromContent();
|
checkAppeared(true);
|
||||||
|
updateUserpicsFromContent();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue