summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-06-17 15:59:50 +0800
committerCheng-Han, Wu2016-06-17 15:59:50 +0800
commitd742b332eb71ddd8e762d2e840ca675e6589319c (patch)
tree5128639cd20a8b35e8772c0cbb528bfd93f5e47c /public
parenta9fc8d0dffc67af6e3ecd18daccefb9aa74ed682 (diff)
Rearrange some code execute to make sure loaded is asset in correct position
Diffstat (limited to 'public')
-rw-r--r--public/js/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 2f68dc76..85bd2e1b 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1901,6 +1901,7 @@ socket.on('refresh', function (data) {
updatePermission(data.permission);
updateLastInfo(data);
if (!loaded) {
+ // auto change mode if no content detected
var nocontent = editor.getValue().length <= 0;
if (nocontent) {
if (visibleXS)
@@ -1913,9 +1914,9 @@ socket.on('refresh', function (data) {
editor.focus();
editor.refresh();
}
- loaded = true;
updateViewInner(); // bring up view rendering earlier
updateHistory(); //update history whether have content or not
+ loaded = true;
emitUserStatus(); //send first user status
updateOnlineStatus(); //update first online status
setTimeout(function () {