mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-16 20:22:03 +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) {
|
void StickersBox::Inner::paintEvent(QPaintEvent *e) {
|
||||||
Painter p(this);
|
Painter p(this);
|
||||||
|
|
||||||
_a_shifting.step();
|
if (_a_shifting.animating()) {
|
||||||
|
_a_shifting.step();
|
||||||
|
}
|
||||||
|
|
||||||
auto clip = e->rect();
|
auto clip = e->rect();
|
||||||
auto ms = getms();
|
auto ms = getms();
|
||||||
|
@ -219,7 +219,9 @@ void DialogsInner::paintRegion(Painter &p, const QRegion ®ion, bool paintingO
|
|||||||
auto fullWidth = getFullWidth();
|
auto fullWidth = getFullWidth();
|
||||||
auto ms = getms();
|
auto ms = getms();
|
||||||
if (_state == State::Default) {
|
if (_state == State::Default) {
|
||||||
_a_pinnedShifting.step(ms, false);
|
if (_a_pinnedShifting.animating()) {
|
||||||
|
_a_pinnedShifting.step(ms, false);
|
||||||
|
}
|
||||||
|
|
||||||
auto rows = shownDialogs();
|
auto rows = shownDialogs();
|
||||||
auto dialogsClip = r;
|
auto dialogsClip = r;
|
||||||
@ -1006,15 +1008,16 @@ bool DialogsInner::updateReorderPinned(QPoint localPosition) {
|
|||||||
void DialogsInner::step_pinnedShifting(TimeMs ms, bool timer) {
|
void DialogsInner::step_pinnedShifting(TimeMs ms, bool timer) {
|
||||||
if (anim::Disabled()) {
|
if (anim::Disabled()) {
|
||||||
ms += st::stickersRowDuration;
|
ms += st::stickersRowDuration;
|
||||||
update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto wasAnimating = false;
|
||||||
auto animating = false;
|
auto animating = false;
|
||||||
auto updateMin = -1;
|
auto updateMin = -1;
|
||||||
auto updateMax = 0;
|
auto updateMax = 0;
|
||||||
for (auto i = 0, l = static_cast<int>(_pinnedRows.size()); i != l; ++i) {
|
for (auto i = 0, l = static_cast<int>(_pinnedRows.size()); i != l; ++i) {
|
||||||
auto start = _pinnedRows[i].animStartTime;
|
auto start = _pinnedRows[i].animStartTime;
|
||||||
if (start) {
|
if (start) {
|
||||||
|
wasAnimating = true;
|
||||||
if (updateMin < 0) updateMin = i;
|
if (updateMin < 0) updateMin = i;
|
||||||
updateMax = i;
|
updateMax = i;
|
||||||
if (start + st::stickersRowDuration > ms && ms >= start) {
|
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();
|
updateReorderIndexGetCount();
|
||||||
if (_draggingIndex >= 0) {
|
if (_draggingIndex >= 0) {
|
||||||
if (updateMin < 0 || updateMin > _draggingIndex) {
|
if (updateMin < 0 || updateMin > _draggingIndex) {
|
||||||
|
Loading…
Reference in New Issue
Block a user