fixed chat scroll

This commit is contained in:
RossAsscends
2023-03-18 22:19:08 +09:00
parent 9d5c1800fa
commit fdeb3f225f

View File

@ -2687,6 +2687,7 @@ function showSwipeButtons() {
) { return; } ) { return; }
const currentMessage = $("#chat").children().filter(`[mesid="${count_view_mes - 1}"]`); const currentMessage = $("#chat").children().filter(`[mesid="${count_view_mes - 1}"]`);
const swipeId = chat[chat.length - 1].swipe_id; const swipeId = chat[chat.length - 1].swipe_id;
var swipesCounterHTML = (`${(swipeId + 1)}/${(chat[chat.length - 1].swipes.length)}`);
if (swipeId !== undefined && swipeId != 0) { if (swipeId !== undefined && swipeId != 0) {
currentMessage.children('.swipe_left').css('display', 'flex'); currentMessage.children('.swipe_left').css('display', 'flex');
@ -2710,8 +2711,6 @@ function showSwipeButtons() {
console.log('highlighting R swipe'); console.log('highlighting R swipe');
currentMessage.children('.swipe_right').css('opacity', '0.7'); currentMessage.children('.swipe_right').css('opacity', '0.7');
} }
var swipesCounterHTML = (`${(swipeId + 1)}/${(chat[chat.length - 1].swipes.length)}`);
console.log(swipesCounterHTML); console.log(swipesCounterHTML);
$(".swipes-counter").html(swipesCounterHTML); $(".swipes-counter").html(swipesCounterHTML);