Merge branch 'reconnect' into staging

This commit is contained in:
yflory
2020-03-26 15:24:38 +01:00
6 changed files with 64 additions and 28 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();