feat: update backlog sync logic to queue requests and adjust response structure
This commit is contained in:
+2
-2
@@ -126,13 +126,13 @@
|
||||
el.channelFilter.value = state.selectedTextChannel;
|
||||
applyActiveTab(state.activeTab);
|
||||
if ((textChanged || textGuildChanged) && state.selectedTextChannel && state.selectedTextGuild) {
|
||||
await apiRequest('/api/backlog-sync', {
|
||||
apiRequest('/api/backlog-sync', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ guildId: state.selectedTextGuild, channelId: state.selectedTextChannel }),
|
||||
}).catch((error) => showError(`Backlog sync failed: ${error.message}`));
|
||||
}
|
||||
if (textChanged || textGuildChanged || state.activeTab === 'text') {
|
||||
await fetchText().catch((error) => showError(error.message));
|
||||
fetchText().catch((error) => showError(error.message));
|
||||
}
|
||||
await reconcileListenState();
|
||||
await reconcileStreamingState();
|
||||
|
||||
Reference in New Issue
Block a user