Browse Source

Fix chatlist reorder when unpinning old dialog

master
Eduard Kuzmenko 4 years ago
parent
commit
43cf1baa8a
  1. 6
      src/lib/appManagers/appDialogsManager.ts

6
src/lib/appManagers/appDialogsManager.ts

@ -915,6 +915,12 @@ export class AppDialogsManager {
} }
const needIndex = index - offset; const needIndex = index - offset;
if(needIndex > currentOrder.length) {
dom.listEl.remove();
delete this.doms[dialog.peerID];
return;
}
const peerIDByIndex = currentOrder[needIndex]; const peerIDByIndex = currentOrder[needIndex];
if(peerIDByIndex != dialog.peerID) { if(peerIDByIndex != dialog.peerID) {

Loading…
Cancel
Save