mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
WIP preserve local changes before duckie merge
This commit is contained in:
@@ -48,6 +48,18 @@ export class MessengerThread
|
||||
return chat;
|
||||
}
|
||||
|
||||
public getChat(chatId: number): MessengerThreadChat
|
||||
{
|
||||
for(const group of this._groups)
|
||||
{
|
||||
const chat = group.chats.find(existingChat => (existingChat.id === chatId));
|
||||
|
||||
if(chat) return chat;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private pruneChats(): void
|
||||
{
|
||||
let totalChats = this._groups.reduce((total, current) => (total + current.chats.length), 0);
|
||||
|
||||
Reference in New Issue
Block a user