mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Don't jump in chats list scroll while reordering.
While we reorder the pinned chats we move chat rows around which sometimes produces auto scroll event that will try to reorder more. This should probably fix assertion violation that was debugged using additional information from commits8b96f72,c7e63ffanda935075.
This commit is contained in:
@@ -1049,7 +1049,10 @@ void DialogsInner::createDialog(History *history) {
|
||||
|
||||
int from = dialogsOffset() + changed.movedFrom * st::dialogsRowHeight;
|
||||
int to = dialogsOffset() + changed.movedTo * st::dialogsRowHeight;
|
||||
emit dialogMoved(from, to);
|
||||
if (!_dragging) {
|
||||
// Don't jump in chats list scroll position while dragging.
|
||||
emit dialogMoved(from, to);
|
||||
}
|
||||
|
||||
if (creating) {
|
||||
refresh();
|
||||
@@ -1690,7 +1693,10 @@ void DialogsInner::notify_historyMuteUpdated(History *history) {
|
||||
|
||||
int from = dialogsOffset() + changed.movedFrom * st::dialogsRowHeight;
|
||||
int to = dialogsOffset() + changed.movedTo * st::dialogsRowHeight;
|
||||
emit dialogMoved(from, to);
|
||||
if (!_dragging) {
|
||||
// Don't jump in chats list scroll position while dragging.
|
||||
emit dialogMoved(from, to);
|
||||
}
|
||||
|
||||
if (creating) {
|
||||
refresh();
|
||||
|
||||
Reference in New Issue
Block a user