Reset queue order when opening another group chat
This commit is contained in:
parent
04b46a270d
commit
4c66588312
|
@ -121,6 +121,7 @@ const DEFAULT_AUTO_MODE_DELAY = 5;
|
||||||
export const groupCandidatesFilter = new FilterHelper(debounce(printGroupCandidates, debounce_timeout.quick));
|
export const groupCandidatesFilter = new FilterHelper(debounce(printGroupCandidates, debounce_timeout.quick));
|
||||||
let autoModeWorker = null;
|
let autoModeWorker = null;
|
||||||
const saveGroupDebounced = debounce(async (group, reload) => await _save(group, reload), debounce_timeout.relaxed);
|
const saveGroupDebounced = debounce(async (group, reload) => await _save(group, reload), debounce_timeout.relaxed);
|
||||||
|
/** @type {Map<string, number>} */
|
||||||
let groupChatQueueOrder = new Map();
|
let groupChatQueueOrder = new Map();
|
||||||
|
|
||||||
function setAutoModeWorker() {
|
function setAutoModeWorker() {
|
||||||
|
@ -1631,6 +1632,7 @@ export async function openGroupById(groupId) {
|
||||||
select_group_chats(groupId);
|
select_group_chats(groupId);
|
||||||
|
|
||||||
if (selected_group !== groupId) {
|
if (selected_group !== groupId) {
|
||||||
|
groupChatQueueOrder = new Map();
|
||||||
await clearChat();
|
await clearChat();
|
||||||
cancelTtsPlay();
|
cancelTtsPlay();
|
||||||
selected_group = groupId;
|
selected_group = groupId;
|
||||||
|
|
Loading…
Reference in New Issue