Better reconnect after invalid lastKnownHash

This commit is contained in:
yflory
2020-03-13 17:39:16 +01:00
parent d53e9cff02
commit 578042154e
6 changed files with 66 additions and 32 deletions

View File

@@ -1331,6 +1331,15 @@ MessengerUI, Messages) {
showColors = true;
};
// If we had to create a new chainpad instance, reset the one used in the toolbar
toolbar.resetChainpad = function (chainpad) {
if (config.realtime !== chainpad) {
config.realtime = chainpad;
config.realtime.onPatch(ks(toolbar, config));
config.realtime.onMessage(ks(toolbar, config, true));
}
};
// On log out, remove permanently the realtime elements of the toolbar
Common.onLogout(function () {
failed();