2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Removed RefPair struct. Beta 9040128.

This commit is contained in:
John Preston
2016-04-11 15:14:54 +04:00
parent e0d6a68554
commit 576239166d
7 changed files with 25 additions and 55 deletions

View File

@@ -456,14 +456,15 @@ void DialogsInner::createDialog(History *history) {
}
}
}
RefPair(int32, movedFrom, int32, movedTo) = changed;
emit dialogMoved(movedFrom, movedTo);
int from = dialogsOffset() + changed.movedFrom * st::dlgHeight;
int to = dialogsOffset() + changed.movedTo * st::dlgHeight;
emit dialogMoved(from, to);
if (creating) {
refresh();
} else if (_state == DefaultState && movedFrom != movedTo) {
update(0, dialogsOffset() + qMin(movedFrom, movedTo), fullWidth(), qAbs(movedFrom - movedTo) + st::dlgHeight);
} else if (_state == DefaultState && changed.movedFrom != changed.movedTo) {
update(0, qMin(from, to), fullWidth(), qAbs(from - to) + st::dlgHeight);
}
}
@@ -1162,14 +1163,15 @@ void DialogsInner::notify_historyMuteUpdated(History *history) {
if (Global::DialogsMode() != Dialogs::Mode::Important) {
return;
}
RefPair(int32, movedFrom, int32, movedTo) = changed;
emit dialogMoved(movedFrom, movedTo);
int from = dialogsOffset() + changed.movedFrom * st::dlgHeight;
int to = dialogsOffset() + changed.movedTo * st::dlgHeight;
emit dialogMoved(from, to);
if (creating) {
refresh();
} else if (_state == DefaultState && movedFrom != movedTo) {
update(0, dialogsOffset() + qMin(movedFrom, movedTo), fullWidth(), qAbs(movedFrom - movedTo) + st::dlgHeight);
} else if (_state == DefaultState && changed.movedFrom != changed.movedTo) {
update(0, qMin(from, to), fullWidth(), qAbs(from - to) + st::dlgHeight);
}
}
}