Reset queue order when opening another group chat

This commit is contained in:
Cohee 2024-07-04 20:23:27 +03:00
parent 04b46a270d
commit 4c66588312
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,7 @@ const DEFAULT_AUTO_MODE_DELAY = 5;
export const groupCandidatesFilter = new FilterHelper(debounce(printGroupCandidates, debounce_timeout.quick));
let autoModeWorker = null;
const saveGroupDebounced = debounce(async (group, reload) => await _save(group, reload), debounce_timeout.relaxed);
/** @type {Map<string, number>} */
let groupChatQueueOrder = new Map();
function setAutoModeWorker() {
@ -1631,6 +1632,7 @@ export async function openGroupById(groupId) {
select_group_chats(groupId);
if (selected_group !== groupId) {
groupChatQueueOrder = new Map();
await clearChat();
cancelTtsPlay();
selected_group = groupId;