Fix opening groups after conversion
This commit is contained in:
parent
93cb3bfee3
commit
941c67139a
|
@ -1,7 +1,6 @@
|
||||||
import {
|
import {
|
||||||
characters,
|
characters,
|
||||||
saveChat,
|
saveChat,
|
||||||
sendSystemMessage,
|
|
||||||
system_messages,
|
system_messages,
|
||||||
system_message_types,
|
system_message_types,
|
||||||
this_chid,
|
this_chid,
|
||||||
|
@ -19,6 +18,7 @@ import {
|
||||||
getGroupPastChats,
|
getGroupPastChats,
|
||||||
group_activation_strategy,
|
group_activation_strategy,
|
||||||
groups,
|
groups,
|
||||||
|
openGroupById,
|
||||||
openGroupChat,
|
openGroupChat,
|
||||||
saveGroupBookmarkChat,
|
saveGroupBookmarkChat,
|
||||||
selected_group,
|
selected_group,
|
||||||
|
@ -301,13 +301,12 @@ async function convertSoloToGroupChat() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Click on the freshly selected group to open it
|
// Click on the freshly selected group to open it
|
||||||
$(`.group_select[grid="${group.id}"]`).click();
|
await openGroupById(group.id);
|
||||||
|
|
||||||
await delay(1);
|
|
||||||
toastr.success('The chat has been successfully converted!');
|
toastr.success('The chat has been successfully converted!');
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
jQuery(function () {
|
||||||
$('#option_new_bookmark').on('click', saveBookmarkMenu);
|
$('#option_new_bookmark').on('click', saveBookmarkMenu);
|
||||||
$('#option_back_to_main').on('click', backToMainChat);
|
$('#option_back_to_main').on('click', backToMainChat);
|
||||||
$('#option_convert_to_group').on('click', convertSoloToGroupChat);
|
$('#option_convert_to_group').on('click', convertSoloToGroupChat);
|
||||||
|
|
|
@ -1234,9 +1234,7 @@ function updateFavButtonState(state) {
|
||||||
$("#group_favorite_button").toggleClass('fav_off', !fav_grp_checked);
|
$("#group_favorite_button").toggleClass('fav_off', !fav_grp_checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function selectGroup() {
|
export async function openGroupById(groupId) {
|
||||||
const groupId = $(this).data("id");
|
|
||||||
|
|
||||||
if (!is_send_press && !is_group_generating) {
|
if (!is_send_press && !is_group_generating) {
|
||||||
if (selected_group !== groupId) {
|
if (selected_group !== groupId) {
|
||||||
cancelTtsPlay();
|
cancelTtsPlay();
|
||||||
|
@ -1548,7 +1546,10 @@ function doCurMemberListPopout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(() => {
|
jQuery(() => {
|
||||||
$(document).on("click", ".group_select", selectGroup);
|
$(document).on("click", ".group_select", function () {
|
||||||
|
const groupId = $(this).data("id");
|
||||||
|
openGroupById(groupId);
|
||||||
|
});
|
||||||
$("#rm_group_filter").on("input", filterGroupMembers);
|
$("#rm_group_filter").on("input", filterGroupMembers);
|
||||||
$("#rm_group_submit").on("click", createGroup);
|
$("#rm_group_submit").on("click", createGroup);
|
||||||
$("#rm_group_scenario").on("click", setScenarioOverride);
|
$("#rm_group_scenario").on("click", setScenarioOverride);
|
||||||
|
|
Loading…
Reference in New Issue