fix /newchat

This commit is contained in:
RossAscends
2023-06-15 14:14:53 +09:00
parent 1e87d973f1
commit 968af1a8b2

View File

@@ -869,8 +869,10 @@ function resetMovablePanels() {
eventSource.emit(event_types.MOVABLE_PANELS_RESET); eventSource.emit(event_types.MOVABLE_PANELS_RESET);
} }
function doNewchat() { function doNewChat() {
$("#option_start_new_chat").trigger('click'); setTimeout(() => {
$("#option_start_new_chat").trigger('click');
}, 1);
$("#dialogue_popup").hide(); $("#dialogue_popup").hide();
$("#dialogue_popup_ok").trigger('click'); $("#dialogue_popup_ok").trigger('click');
} }
@@ -1235,6 +1237,6 @@ $(document).ready(() => {
}); });
registerSlashCommand('vn', toggleWaifu, ['vn'], ' swaps Visual Novel Mode On/Off', false, true); registerSlashCommand('vn', toggleWaifu, ['vn'], ' swaps Visual Novel Mode On/Off', false, true);
registerSlashCommand('newchat', doNewchat, ['newchat'], ' start a new chat with current character', true, true); registerSlashCommand('newchat', doNewChat, ['newchat'], ' start a new chat with current character', true, true);
registerSlashCommand('delmode', doDelMode, ['delmode'], ' enter message deletion mode', true, true); registerSlashCommand('delmode', doDelMode, ['delmode'], ' enter message deletion mode', true, true);
}); });