We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e52e87 commit 81f4720Copy full SHA for 81f4720
src/pages/chats/chats.ts
@@ -31,13 +31,7 @@ export class ChatsPage implements OnInit {
31
}
32
33
removeChat(chat: Chat): void {
34
- this.chats = this.chats.map((chatsArray: Chat[]) => {
35
- const chatIndex = chatsArray.indexOf(chat);
36
- if (chatIndex !== -1) {
37
- chatsArray.splice(chatIndex, 1);
38
- }
39
-
40
- return chatsArray;
+ Chats.remove({_id: chat._id}).subscribe(() => {
41
});
42
43
0 commit comments