MDL-67700 message: correcting conversation timer reset
authorFerran Recio <ferran@moodle.com>
Mon, 18 May 2020 16:27:08 +0000 (18:27 +0200)
committerFerran Recio <ferran@moodle.com>
Tue, 19 May 2020 06:38:26 +0000 (08:38 +0200)
message/amd/build/message_drawer_view_conversation.min.js
message/amd/build/message_drawer_view_conversation.min.js.map
message/amd/src/message_drawer_view_conversation.js

index 29fbeeb..446a342 100644 (file)
Binary files a/message/amd/build/message_drawer_view_conversation.min.js and b/message/amd/build/message_drawer_view_conversation.min.js differ
index b1c6bcc..bf01ac7 100644 (file)
Binary files a/message/amd/build/message_drawer_view_conversation.min.js.map and b/message/amd/build/message_drawer_view_conversation.min.js.map differ
index 7b911ce..31ccbae 100644 (file)
@@ -1865,6 +1865,9 @@ function(
     var resetState = function(body, conversationId, loggedInUserProfile) {
         // Reset all of the states back to the beginning if we're loading a new
         // conversation.
+        if (newMessagesPollTimer) {
+            newMessagesPollTimer.stop();
+        }
         loadedAllMessages = false;
         messagesOffset = 0;
         newMessagesPollTimer = null;
@@ -1893,10 +1896,6 @@ function(
             viewState = initialState;
         }
 
-        if (newMessagesPollTimer) {
-            newMessagesPollTimer.stop();
-        }
-
         render(initialState);
     };