morethanwords 3 years ago
parent
commit
00ac60c4e5
  1. 5
      src/components/sidebarLeft/tabs/archivedTab.ts
  2. 13
      src/lib/appManagers/appDialogsManager.ts

5
src/components/sidebarLeft/tabs/archivedTab.ts

@ -16,7 +16,10 @@ export default class AppArchivedTab extends SliderSuperTab { @@ -16,7 +16,10 @@ export default class AppArchivedTab extends SliderSuperTab {
this.setTitle('ArchivedChats');
if(!appDialogsManager.chatLists[AppArchivedTab.filterId]) {
appDialogsManager.generateScrollable(appDialogsManager.createChatList(), AppArchivedTab.filterId);
const chatList = appDialogsManager.createChatList();
appDialogsManager.generateScrollable(chatList, AppArchivedTab.filterId);
appDialogsManager.setListClickListener(chatList, null, true);
//appDialogsManager.setListClickListener(archivedChatList, null, true); // * to test peer changing
}
const scrollable = appDialogsManager.scrollables[AppArchivedTab.filterId];

13
src/lib/appManagers/appDialogsManager.ts

@ -211,7 +211,7 @@ export class AppDialogsManager { @@ -211,7 +211,7 @@ export class AppDialogsManager {
private contextMenu = new DialogsContextMenu();
public chatLists: {[filterId: number]: HTMLUListElement};
public chatLists: {[filterId: number]: HTMLUListElement} = {};
public scrollables: {[filterId: number]: Scrollable} = {};
public filterId: number;
private folders: {[k in 'menu' | 'container' | 'menuScrollContainer']: HTMLElement} = {
@ -240,17 +240,6 @@ export class AppDialogsManager { @@ -240,17 +240,6 @@ export class AppDialogsManager {
private lastActiveElements: Set<HTMLElement> = new Set();
constructor() {
const archivedChatList = this.createChatList();
this.chatLists = {
1: archivedChatList
};
this.scrollables = {
1: this.generateScrollable(this.chatLists[1], 1)
};
this.setListClickListener(archivedChatList, null, true);
//this.setListClickListener(archivedChatList, null, true); // * to test peer changing
this.chatsPreloader = putPreloader(null, true);
this.allUnreadCount = this.folders.menu.querySelector('.badge');

Loading…
Cancel
Save