diff --git a/frontend/src/routes/bots/TelegramBotTab.svelte b/frontend/src/routes/bots/TelegramBotTab.svelte
index 7088fa0..2d14a33 100644
--- a/frontend/src/routes/bots/TelegramBotTab.svelte
+++ b/frontend/src/routes/bots/TelegramBotTab.svelte
@@ -81,13 +81,14 @@
};
}
- function toggleSection(botId: number, section: string) {
+ async function toggleSection(botId: number, section: string) {
if (expandedSection[botId] === section) {
expandedSection = { ...expandedSection, [botId]: '' };
return;
}
+ if (section === 'chats' && !chats[botId]) await loadChats(botId);
+ else if (section === 'listeners' && !botListenerStatus[botId]) await loadListenerStatus(botId);
expandedSection = { ...expandedSection, [botId]: section };
- if (section === 'chats') loadChats(botId);
}
async function loadChats(botId: number) {
@@ -344,12 +345,14 @@
editBot(bot)} />
-