From 95b11fbbd8d27a8c58bd0051e8d2d4166149ee9f Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Mon, 16 Jan 2023 17:16:19 +0800 Subject: [PATCH] fix(user_msg): clear interval before open new chat --- web/app/controllers/user_msg.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/app/controllers/user_msg.php b/web/app/controllers/user_msg.php index fe28e1d..0e22183 100644 --- a/web/app/controllers/user_msg.php +++ b/web/app/controllers/user_msg.php @@ -371,6 +371,7 @@ if (isset($_POST['user_msg'])) { var slideTime = 300; var page = 1; var changeAble = refreshHistory(conversationName, page); + clearInterval(intervalId); intervalId = setInterval(function() { changeAble = refreshHistory(conversationName, page); }, REFRESH_INTERVAL);