diff --git a/src/pages/chats/chats.ts b/src/pages/chats/chats.ts index 31f8b9d8f..017cdce53 100644 --- a/src/pages/chats/chats.ts +++ b/src/pages/chats/chats.ts @@ -67,4 +67,13 @@ export class ChatsPage { } ]); } + + removeChat(chat: Chat): void { + this.chats = this.chats.map(chatsArray => { + const chatIndex = chatsArray.indexOf(chat); + chatsArray.splice(chatIndex, 1); + + return chatsArray; + }); + } }