Hopefully fix infinite spinner whenever there is a disconnect (pad)

This commit is contained in:
Caleb James DeLisle
2017-09-11 15:46:21 +02:00
parent 684a12ce2e
commit 7334173b4a
10 changed files with 128 additions and 43 deletions

View File

@@ -711,6 +711,7 @@ define([
}, local ? 0 : SPINNER_DISAPPEAR_TIME);
};
if (Cryptpad) {
Cryptpad.beginDetectingInfiniteSpinner(config.realtime);
Cryptpad.whenRealtimeSyncs(config.realtime, onSynced);
return;
}
@@ -733,6 +734,9 @@ define([
// receive a patch.
if (Cryptpad) {
typing = 0;
// We're just placing this detector here because it used to be triggered by
// whenRealtimeSyncs() and now it is not because in sframe it is handled differently.
Cryptpad.beginDetectingInfiniteSpinner(config.realtime);
Cryptpad.whenRealtimeSyncs(config.realtime, function () {
kickSpinner(toolbar, config);
});