sidebar: reinitialize after reconnect only
It seems that commit 2d7743cb73
sidebar: initialize after recover from idle
Introduced a regression, in multi user case sometimes
sidebar is shown/hidden by other users. Also app was
slow sometimes what could be a sidebar reloading all
the time.
Revert previous single-init on docloaded and use dedicated
reconnection code to reinitialize sidebar.
This should still fix the problem that when doc become unloaded
with sidebar opened - after reconnecting it was not possible
to close.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4c66d6e7ca0998ea4461ebca1aa401ca4d65a4a9
This commit is contained in:
parent
50734d335e
commit
da3e22ff74
2 changed files with 2 additions and 1 deletions
|
@ -1418,6 +1418,7 @@ app.definitions.Socket = L.Class.extend({
|
|||
this._map.uiManager.closeAll();
|
||||
this._map.setPermission(app.file.permission);
|
||||
window.migrating = false;
|
||||
this._map.uiManager.initializeSidebar();
|
||||
}
|
||||
|
||||
this._map.fire('docloaded', {status: true});
|
||||
|
|
|
@ -295,7 +295,7 @@ L.Map = L.Evented.extend({
|
|||
this.initializeModificationIndicator();
|
||||
|
||||
// Show sidebar.
|
||||
if (this._docLayer) {
|
||||
if (this._docLayer && !this._docLoadedOnce) {
|
||||
// Let the first page finish loading then load the sidebar.
|
||||
setTimeout(this.uiManager.initializeSidebar.bind(this.uiManager), 200);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue