From 42a3dda2f570cac53873085ea6481fbb0b299086 Mon Sep 17 00:00:00 2001 From: Sercan Yemen <117369+srcn@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:08:22 +0300 Subject: [PATCH] (apps/chat) Reset the current selected chat when component destroyed --- src/app/modules/admin/apps/chat/chats/chats.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/modules/admin/apps/chat/chats/chats.component.ts b/src/app/modules/admin/apps/chat/chats/chats.component.ts index 76cbee94..8fe8a724 100644 --- a/src/app/modules/admin/apps/chat/chats/chats.component.ts +++ b/src/app/modules/admin/apps/chat/chats/chats.component.ts @@ -92,6 +92,9 @@ export class ChatsComponent implements OnInit, OnDestroy // Unsubscribe from all subscriptions this._unsubscribeAll.next(null); this._unsubscribeAll.complete(); + + // Reset the chat + this._chatService.resetChat(); } // -----------------------------------------------------------------------------------------------------