Don't show the tab notification when someone has joined the pad
This commit is contained in:
@@ -684,8 +684,9 @@ define([
|
|||||||
module.patchText(shjson2);
|
module.patchText(shjson2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (oldDoc !== remoteDoc) {
|
||||||
notify();
|
notify();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var onAbort = config.onAbort = function (info) {
|
var onAbort = config.onAbort = function (info) {
|
||||||
|
|||||||
@@ -477,6 +477,8 @@ define([
|
|||||||
var onRemote = realtimeOptions.onRemote = function (info) {
|
var onRemote = realtimeOptions.onRemote = function (info) {
|
||||||
if (initializing) { return; }
|
if (initializing) { return; }
|
||||||
|
|
||||||
|
var oldShjson = stringifyDOM(inner);
|
||||||
|
|
||||||
var shjson = info.realtime.getUserDoc();
|
var shjson = info.realtime.getUserDoc();
|
||||||
|
|
||||||
// remember where the cursor is
|
// remember where the cursor is
|
||||||
@@ -485,6 +487,11 @@ define([
|
|||||||
// Update the user list (metadata) from the hyperjson
|
// Update the user list (metadata) from the hyperjson
|
||||||
updateMetadata(shjson);
|
updateMetadata(shjson);
|
||||||
|
|
||||||
|
var newInner = JSON.parse(shjson);
|
||||||
|
if (newInner.length > 2) {
|
||||||
|
var newSInner = stringify(newInner[2]);
|
||||||
|
}
|
||||||
|
|
||||||
// build a dom from HJSON, diff, and patch the editor
|
// build a dom from HJSON, diff, and patch the editor
|
||||||
applyHjson(shjson);
|
applyHjson(shjson);
|
||||||
|
|
||||||
@@ -518,7 +525,12 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notify only when the content has changed, not when someone has joined/left
|
||||||
|
var oldSInner = stringify(JSON.parse(oldShjson)[2]);
|
||||||
|
if (newSInner !== oldSInner) {
|
||||||
notify();
|
notify();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var getHTML = function (Dom) {
|
var getHTML = function (Dom) {
|
||||||
|
|||||||
@@ -768,7 +768,9 @@ define([
|
|||||||
}
|
}
|
||||||
Slide.update(remoteDoc);
|
Slide.update(remoteDoc);
|
||||||
|
|
||||||
|
if (oldDoc !== newDoc) {
|
||||||
notify();
|
notify();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var onAbort = config.onAbort = function (info) {
|
var onAbort = config.onAbort = function (info) {
|
||||||
|
|||||||
Reference in New Issue
Block a user