Fix avatar in the user view
This commit is contained in:
parent
f67eeee8c8
commit
2d8237bd83
3 changed files with 17 additions and 12 deletions
|
@ -12,7 +12,7 @@ angular.module('quay').directive('avatar', function () {
|
|||
'data': '=data',
|
||||
'size': '=size'
|
||||
},
|
||||
controller: function($scope, $element, AvatarService, Config, UIService) {
|
||||
controller: function($scope, $element, AvatarService, Config, UIService, $timeout) {
|
||||
$scope.AvatarService = AvatarService;
|
||||
$scope.Config = Config;
|
||||
$scope.isLoading = true;
|
||||
|
@ -20,8 +20,10 @@ angular.module('quay').directive('avatar', function () {
|
|||
$scope.loadGravatar = false;
|
||||
|
||||
$scope.imageCallback = function(r) {
|
||||
$scope.isLoading = false;
|
||||
$scope.hasGravatar = r;
|
||||
$timeout(function() {
|
||||
$scope.isLoading = false;
|
||||
$scope.hasGravatar = r;
|
||||
}, 1);
|
||||
};
|
||||
|
||||
$scope.$watch('size', function(size) {
|
||||
|
|
Reference in a new issue