fix(user_msg): clear interval before open new chat

This commit is contained in:
Baoshuo Ren 2023-01-16 17:16:19 +08:00
parent c26ad98ff0
commit 95b11fbbd8
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -371,6 +371,7 @@ if (isset($_POST['user_msg'])) {
var slideTime = 300; var slideTime = 300;
var page = 1; var page = 1;
var changeAble = refreshHistory(conversationName, page); var changeAble = refreshHistory(conversationName, page);
clearInterval(intervalId);
intervalId = setInterval(function() { intervalId = setInterval(function() {
changeAble = refreshHistory(conversationName, page); changeAble = refreshHistory(conversationName, page);
}, REFRESH_INTERVAL); }, REFRESH_INTERVAL);