mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-29 01:52:48 +00:00
Fix disabled animations dialogs repaint.
This commit is contained in:
parent
e451dec70c
commit
d601b60903
@ -659,7 +659,9 @@ void StickersBox::Inner::setInnerFocus() {
|
||||
void StickersBox::Inner::paintEvent(QPaintEvent *e) {
|
||||
Painter p(this);
|
||||
|
||||
_a_shifting.step();
|
||||
if (_a_shifting.animating()) {
|
||||
_a_shifting.step();
|
||||
}
|
||||
|
||||
auto clip = e->rect();
|
||||
auto ms = getms();
|
||||
|
@ -219,7 +219,9 @@ void DialogsInner::paintRegion(Painter &p, const QRegion ®ion, bool paintingO
|
||||
auto fullWidth = getFullWidth();
|
||||
auto ms = getms();
|
||||
if (_state == State::Default) {
|
||||
_a_pinnedShifting.step(ms, false);
|
||||
if (_a_pinnedShifting.animating()) {
|
||||
_a_pinnedShifting.step(ms, false);
|
||||
}
|
||||
|
||||
auto rows = shownDialogs();
|
||||
auto dialogsClip = r;
|
||||
@ -1006,15 +1008,16 @@ bool DialogsInner::updateReorderPinned(QPoint localPosition) {
|
||||
void DialogsInner::step_pinnedShifting(TimeMs ms, bool timer) {
|
||||
if (anim::Disabled()) {
|
||||
ms += st::stickersRowDuration;
|
||||
update();
|
||||
}
|
||||
|
||||
auto wasAnimating = false;
|
||||
auto animating = false;
|
||||
auto updateMin = -1;
|
||||
auto updateMax = 0;
|
||||
for (auto i = 0, l = static_cast<int>(_pinnedRows.size()); i != l; ++i) {
|
||||
auto start = _pinnedRows[i].animStartTime;
|
||||
if (start) {
|
||||
wasAnimating = true;
|
||||
if (updateMin < 0) updateMin = i;
|
||||
updateMax = i;
|
||||
if (start + st::stickersRowDuration > ms && ms >= start) {
|
||||
@ -1026,7 +1029,7 @@ void DialogsInner::step_pinnedShifting(TimeMs ms, bool timer) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (timer) {
|
||||
if (timer || (wasAnimating && !animating)) {
|
||||
updateReorderIndexGetCount();
|
||||
if (_draggingIndex >= 0) {
|
||||
if (updateMin < 0 || updateMin > _draggingIndex) {
|
||||
|
Loading…
Reference in New Issue
Block a user