Reset queue order when opening another group chat
| @@ -121,6 +121,7 @@ const DEFAULT_AUTO_MODE_DELAY = 5; | ||
| 121 | 121 | export const groupCandidatesFilter = new FilterHelper(debounce(printGroupCandidates, debounce_timeout.quick)); |
| 122 | 122 | let autoModeWorker = null; |
| 123 | 123 | const saveGroupDebounced = debounce(async (group, reload) => await _save(group, reload), debounce_timeout.relaxed); |
| 124 | +/** @type {Map<string, number>} */ | |
| 124 | 125 | let groupChatQueueOrder = new Map(); |
| 125 | 126 | |
| 126 | 127 | function setAutoModeWorker() { |
| @@ -1631,6 +1632,7 @@ export async function openGroupById(groupId) { | ||
| 1631 | 1632 | select_group_chats(groupId); |
| 1632 | 1633 | |
| 1633 | 1634 | if (selected_group !== groupId) { |
| 1635 | + groupChatQueueOrder = new Map(); | |
| 1634 | 1636 | await clearChat(); |
| 1635 | 1637 | cancelTtsPlay(); |
| 1636 | 1638 | selected_group = groupId; |