Merge pull request #169 from cormier/fix-73
Reinitialize context when relay closes connection
This commit is contained in:
commit
e468fe57f0
2 changed files with 14 additions and 0 deletions
|
@ -378,6 +378,7 @@ function($rootScope,
|
|||
$log.info("Disconnected from relay");
|
||||
failCallbacks('disconnection');
|
||||
$rootScope.connected = false;
|
||||
$rootScope.$emit('relayDisconnect');
|
||||
$rootScope.$apply();
|
||||
};
|
||||
|
||||
|
@ -584,6 +585,11 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
$scope.showSidebar = true;
|
||||
|
||||
$scope.buffers = models.model.buffers;
|
||||
|
||||
$rootScope.$on('relayDisconnect', function() {
|
||||
models.reinitialize();
|
||||
});
|
||||
|
||||
$scope.activeBuffer = models.getActiveBuffer;
|
||||
|
||||
$rootScope.waseverconnected = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue