From fdeb3f225f2f46954bec033a8c843f5037b265b5 Mon Sep 17 00:00:00 2001 From: RossAsscends <124905043+RossAscends@users.noreply.github.com> Date: Sat, 18 Mar 2023 22:19:08 +0900 Subject: [PATCH] fixed chat scroll --- public/script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index 80b6b7c5d..884947f48 100644 --- a/public/script.js +++ b/public/script.js @@ -2687,6 +2687,7 @@ function showSwipeButtons() { ) { return; } const currentMessage = $("#chat").children().filter(`[mesid="${count_view_mes - 1}"]`); const swipeId = chat[chat.length - 1].swipe_id; + var swipesCounterHTML = (`${(swipeId + 1)}/${(chat[chat.length - 1].swipes.length)}`); if (swipeId !== undefined && swipeId != 0) { currentMessage.children('.swipe_left').css('display', 'flex'); @@ -2710,8 +2711,6 @@ function showSwipeButtons() { console.log('highlighting R swipe'); currentMessage.children('.swipe_right').css('opacity', '0.7'); } - - var swipesCounterHTML = (`${(swipeId + 1)}/${(chat[chat.length - 1].swipes.length)}`); console.log(swipesCounterHTML); $(".swipes-counter").html(swipesCounterHTML);