parent
0deb14fc84
commit
b09e328463
2 changed files with 14 additions and 0 deletions
|
@ -378,6 +378,7 @@ function($rootScope,
|
||||||
$log.info("Disconnected from relay");
|
$log.info("Disconnected from relay");
|
||||||
failCallbacks('disconnection');
|
failCallbacks('disconnection');
|
||||||
$rootScope.connected = false;
|
$rootScope.connected = false;
|
||||||
|
$rootScope.$emit('relayDisconnect');
|
||||||
$rootScope.$apply();
|
$rootScope.$apply();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -578,6 +579,11 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.buffers = models.model.buffers;
|
$scope.buffers = models.model.buffers;
|
||||||
|
|
||||||
|
$rootScope.$on('relayDisconnect', function() {
|
||||||
|
models.reinitialize();
|
||||||
|
});
|
||||||
|
|
||||||
$scope.activeBuffer = models.getActiveBuffer;
|
$scope.activeBuffer = models.getActiveBuffer;
|
||||||
|
|
||||||
$rootScope.waseverconnected = false;
|
$rootScope.waseverconnected = false;
|
||||||
|
|
|
@ -425,6 +425,14 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
return BufferList;
|
return BufferList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reinitializes the model
|
||||||
|
*/
|
||||||
|
this.reinitialize = function() {
|
||||||
|
BufferList = [];
|
||||||
|
this.model.buffers = {};
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns a specific buffer object
|
* Returns a specific buffer object
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue