From bd3ea5cc07d320f5cea785f64dffaa0f744b9b57 Mon Sep 17 00:00:00 2001 From: marlon-erler Date: Tue, 23 Jul 2024 01:22:08 +0200 Subject: [PATCH] make removing chats dynamic --- dist/index.js | 3 +-- src/ViewModel/Pages/settingsPageViewModel.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 02c48b4e..380ca03b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1309,7 +1309,6 @@ this.primaryChannelInput.value ); this.primaryChannel.value = this.chatViewModel.chatModel.info.primaryChannel; - this.chatViewModel.chatListViewModel.updateIndices(); }; addSecondaryChannel = () => { this.secondaryChannels.add(this.newSecondaryChannelInput.value); @@ -1339,7 +1338,7 @@ remove = () => { this.chatViewModel.close(); this.chatViewModel.chatModel.delete(); - this.chatViewModel.chatListViewModel.loadChats(); + this.chatViewModel.chatListViewModel.untrackChat(this.chatViewModel); }; // load loadListRelevantData = () => { diff --git a/src/ViewModel/Pages/settingsPageViewModel.ts b/src/ViewModel/Pages/settingsPageViewModel.ts index 7ffe66b4..dec60fb8 100644 --- a/src/ViewModel/Pages/settingsPageViewModel.ts +++ b/src/ViewModel/Pages/settingsPageViewModel.ts @@ -42,7 +42,6 @@ export default class SettingsPageViewModel { ); this.primaryChannel.value = this.chatViewModel.chatModel.info.primaryChannel; - this.chatViewModel.chatListViewModel.updateIndices(); }; addSecondaryChannel = (): void => { @@ -80,7 +79,7 @@ export default class SettingsPageViewModel { remove = (): void => { this.chatViewModel.close(); this.chatViewModel.chatModel.delete(); - this.chatViewModel.chatListViewModel.loadChats(); + this.chatViewModel.chatListViewModel.untrackChat(this.chatViewModel); }; // load