Commit 6d2a9345 authored by Alexander.Trofimov's avatar Alexander.Trofimov

move call Continue_FastCollaborativeEditing to autoSave function

parent 0aa8dd28
...@@ -3311,7 +3311,6 @@ function CEditorPage(api) ...@@ -3311,7 +3311,6 @@ function CEditorPage(api)
oThis.m_oLogicDocument.Continue_CheckSpelling(); oThis.m_oLogicDocument.Continue_CheckSpelling();
oThis.m_oLogicDocument.Continue_TrackRevisions(); oThis.m_oLogicDocument.Continue_TrackRevisions();
oThis.m_oLogicDocument.Continue_FastCollaborativeEditing();
}; };
this.OnScroll = function() this.OnScroll = function()
{ {
......
...@@ -1881,22 +1881,26 @@ background-repeat: no-repeat;\ ...@@ -1881,22 +1881,26 @@ background-repeat: no-repeat;\
this.asc_Save(true); this.asc_Save(true);
this.lastSaveTime = _curTime; this.lastSaveTime = _curTime;
} else { } else {
var _bIsWaitScheme = false; if (AscCommon.CollaborativeEditing.Is_Fast()) {
if (History.Points && History.Index >= 0 && History.Index < History.Points.length) { this.WordControl.m_oLogicDocument.Continue_FastCollaborativeEditing();
if ((_curTime - History.Points[History.Index].Time) < this.intervalWaitAutoSave) { } else {
_bIsWaitScheme = true; var _bIsWaitScheme = false;
if (History.Points && History.Index >= 0 && History.Index < History.Points.length) {
if ((_curTime - History.Points[History.Index].Time) < this.intervalWaitAutoSave) {
_bIsWaitScheme = true;
}
} }
}
if (!_bIsWaitScheme) { if (!_bIsWaitScheme) {
var _interval = (AscCommon.CollaborativeEditing.m_nUseType <= 0) ? this.autoSaveGapSlow : var _interval = (AscCommon.CollaborativeEditing.m_nUseType <= 0) ? this.autoSaveGapSlow :
this.autoSaveGapFast; this.autoSaveGapFast;
if ((_curTime - this.lastSaveTime) > _interval) { if ((_curTime - this.lastSaveTime) > _interval) {
if (History.Have_Changes(true) == true) { if (History.Have_Changes(true) == true) {
this.asc_Save(true); this.asc_Save(true);
}
this.lastSaveTime = _curTime;
} }
this.lastSaveTime = _curTime;
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment