Restore full hash when safe hash is deleted from the drive

This commit is contained in:
yflory
2020-01-29 18:38:13 +01:00
parent 9961bffd48
commit 464eaee49a
5 changed files with 55 additions and 3 deletions

View File

@@ -1324,7 +1324,16 @@ define([
}
} catch (e) {}
// If our channel was deleted from all of our drives, sitch back to full hash
// in the address bar
Cryptpad.padRpc.onChannelDeleted.reg(function (channel) {
if (channel !== secret.channel) { return; }
var ohc = window.onhashchange;
window.onhashchange = function () {};
window.location.href = currentPad.href;
window.onhashchange = ohc;
ohc({reset: true});
});
// Join the netflux channel
var rtStarted = false;