diff --git a/src/pages/chats/chats.ts b/src/pages/chats/chats.ts index 34f74f4fb..06ec99741 100644 --- a/src/pages/chats/chats.ts +++ b/src/pages/chats/chats.ts @@ -31,11 +31,7 @@ export class ChatsPage implements OnInit { } removeChat(chat: Chat): void { - this.chats = this.chats.map(chatsArray => { - const chatIndex = chatsArray.indexOf(chat); - chatsArray.splice(chatIndex, 1); - - return chatsArray; + Chats.remove({_id: chat._id}).subscribe(() => { }); } }