mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix swipes and thumbnails for groups
This commit is contained in:
@ -102,6 +102,8 @@ export {
|
||||
saveChat,
|
||||
messageFormating,
|
||||
getExtensionPrompt,
|
||||
showSwipeButtons,
|
||||
hideSwipeButtons,
|
||||
chat,
|
||||
this_chid,
|
||||
settings,
|
||||
@ -1722,7 +1724,7 @@ async function Generate(type, automatic_trigger, force_name2) {//encode("dsfs").
|
||||
console.log('entering chat update for groups');
|
||||
let avatarImg = 'img/ai4.png';
|
||||
if (characters[this_chid].avatar != 'none') {
|
||||
avatarImg = `characters/${characters[this_chid].avatar}?${Date.now()}`;
|
||||
avatarImg = `/thumbnail?type=avatar&file=${encodeURIComponent(characters[this_chid].avatar)}&${Date.now()}`;
|
||||
}
|
||||
chat[chat.length - 1]['is_name'] = true;
|
||||
chat[chat.length - 1]['force_avatar'] = avatarImg;
|
||||
@ -2770,7 +2772,8 @@ function showSwipeButtons() {
|
||||
!swipes ||
|
||||
$('.mes:last').attr('mesid') <= 0 ||
|
||||
chat[chat.length - 1].is_user ||
|
||||
count_view_mes <= 1
|
||||
count_view_mes <= 1 ||
|
||||
(selected_group && is_group_generating)
|
||||
) { return; }
|
||||
|
||||
//had to add this to make the swipe counter work
|
||||
|
@ -33,6 +33,8 @@ import {
|
||||
setRightTabSelectedClass,
|
||||
default_ch_mes,
|
||||
deleteLastMessage,
|
||||
showSwipeButtons,
|
||||
hideSwipeButtons,
|
||||
} from "../script.js";
|
||||
|
||||
export {
|
||||
@ -267,6 +269,7 @@ async function generateGroupWrapper(by_auto_mode, type=null) {
|
||||
}
|
||||
|
||||
try {
|
||||
hideSwipeButtons();
|
||||
is_group_generating = true;
|
||||
setCharacterName('');
|
||||
setCharacterId(undefined);
|
||||
@ -339,6 +342,7 @@ async function generateGroupWrapper(by_auto_mode, type=null) {
|
||||
setSendButtonState(false);
|
||||
setCharacterId(undefined);
|
||||
setCharacterName('');
|
||||
showSwipeButtons();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user