Fix 'Deleted' users
This commit is contained in:
parent
51a42887aa
commit
8de8aa9692
@ -34,7 +34,6 @@ export class AppChatsManager {
|
|||||||
//private megagroups: {[id: number]: true};
|
//private megagroups: {[id: number]: true};
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.chats = this.storage.getCache();
|
|
||||||
this.clear(true);
|
this.clear(true);
|
||||||
|
|
||||||
rootScope.addMultipleEventsListeners({
|
rootScope.addMultipleEventsListeners({
|
||||||
@ -105,8 +104,11 @@ export class AppChatsManager {
|
|||||||
|
|
||||||
chats.findAndSplice((chat) => chat.id === chatId);
|
chats.findAndSplice((chat) => chat.id === chatId);
|
||||||
this.storage.delete(chatId);
|
this.storage.delete(chatId);
|
||||||
|
delete this.chats[chatId];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.chats = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,6 @@ export class AppUsersManager {
|
|||||||
private getTopPeersPromise: Promise<number[]>;
|
private getTopPeersPromise: Promise<number[]>;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.users = this.storage.getCache();
|
|
||||||
this.clear(true);
|
this.clear(true);
|
||||||
|
|
||||||
setInterval(this.updateUsersStatuses, 60000);
|
setInterval(this.updateUsersStatuses, 60000);
|
||||||
@ -174,9 +173,11 @@ export class AppUsersManager {
|
|||||||
|
|
||||||
users.findAndSplice((user) => user.id === userId);
|
users.findAndSplice((user) => user.id === userId);
|
||||||
this.storage.delete(userId);
|
this.storage.delete(userId);
|
||||||
|
delete this.users[userId];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
this.users = {};
|
||||||
this.usernames = {};
|
this.usernames = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user