Rearrange some code execute to make sure loaded is asset in correct position
This commit is contained in:
parent
a9fc8d0dff
commit
d742b332eb
1 changed files with 2 additions and 1 deletions
|
@ -1901,6 +1901,7 @@ socket.on('refresh', function (data) {
|
||||||
updatePermission(data.permission);
|
updatePermission(data.permission);
|
||||||
updateLastInfo(data);
|
updateLastInfo(data);
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
|
// auto change mode if no content detected
|
||||||
var nocontent = editor.getValue().length <= 0;
|
var nocontent = editor.getValue().length <= 0;
|
||||||
if (nocontent) {
|
if (nocontent) {
|
||||||
if (visibleXS)
|
if (visibleXS)
|
||||||
|
@ -1913,9 +1914,9 @@ socket.on('refresh', function (data) {
|
||||||
editor.focus();
|
editor.focus();
|
||||||
editor.refresh();
|
editor.refresh();
|
||||||
}
|
}
|
||||||
loaded = true;
|
|
||||||
updateViewInner(); // bring up view rendering earlier
|
updateViewInner(); // bring up view rendering earlier
|
||||||
updateHistory(); //update history whether have content or not
|
updateHistory(); //update history whether have content or not
|
||||||
|
loaded = true;
|
||||||
emitUserStatus(); //send first user status
|
emitUserStatus(); //send first user status
|
||||||
updateOnlineStatus(); //update first online status
|
updateOnlineStatus(); //update first online status
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue