Save tab after resolving so collab knows the latest version was chosen by the user

pull/333/head
Tim Robinson 2016-06-07 16:50:59 +00:00
rodzic 4364617699
commit 079c22e5aa
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -191,7 +191,6 @@ define(function(require, exports, module) {
} }
function resolve() { function resolve() {
console.log("[watchers] resolved change event without dialog", path);
doc.tab.classList.remove("conflict"); doc.tab.classList.remove("conflict");
delete doc.meta.$merge; delete doc.meta.$merge;
delete changedPaths[path]; delete changedPaths[path];
@ -326,8 +325,10 @@ define(function(require, exports, module) {
doc.meta.$mergeRoot = data; doc.meta.$mergeRoot = data;
// If the value on disk is the same as in the document, set the bookmark // If the value on disk is the same as in the document, set the bookmark
if (mergedValue == data) if (mergedValue == data) {
doc.undoManager.bookmark(); doc.undoManager.bookmark();
save.save(tab);
}
return true; return true;
} }
@ -352,6 +353,7 @@ define(function(require, exports, module) {
var doc = tab.document; var doc = tab.document;
doc.setBookmarkedValue(data, true); doc.setBookmarkedValue(data, true);
doc.meta.timestamp = Date.now() - settings.timeOffset; doc.meta.timestamp = Date.now() - settings.timeOffset;
save.save(tab);
changedPaths[path].resolve(); changedPaths[path].resolve();
} }