parent
6522cd72d3
commit
07d60f96c3
1 changed files with 6 additions and 2 deletions
|
@ -47,8 +47,12 @@ weechat.directive('plugin', ['$rootScope', 'settings', function($rootScope, sett
|
||||||
// TODO store the result between channel switches
|
// TODO store the result between channel switches
|
||||||
if ($scope.plugin.content instanceof Function){
|
if ($scope.plugin.content instanceof Function){
|
||||||
// Don't rerun if the result is already there
|
// Don't rerun if the result is already there
|
||||||
if (embed.innerHTML === "") {
|
if (!embed || embed.innerHTML === "") {
|
||||||
$scope.plugin.content();
|
// if we're autoshowing, the element doesn't exist yet, and we need
|
||||||
|
// to do this async (wrapped in a setTimeout)
|
||||||
|
setTimeout(function() {
|
||||||
|
$scope.plugin.content();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$scope.displayedContent = $scope.plugin.content;
|
$scope.displayedContent = $scope.plugin.content;
|
||||||
|
|
Loading…
Reference in a new issue