Skip to content

Commit f809137

Browse files
committed
MOBILE-1527 messages: Fix problems with top right icon image
1 parent d60a3c1 commit f809137

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

www/addons/messages/controllers/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ angular.module('mm.addons.messages')
3636
}).then(function(user) {
3737
// Verify that no other user was loaded while the async call was in progress.
3838
if ($scope.userId == userId) {
39-
$scope.profileLink = user.profileimageurl;
39+
// Use a default icon if no image URL available.
40+
$scope.profileLink = user.profileimageurl || true;
4041
}
4142
});
4243
}

www/addons/messages/templates/discussion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<ion-nav-buttons side="secondary">
55
<a ng-if="profileLink" mm-user-link userid="{{userId}}" aria-label="{{ 'mm.user.viewprofile' | translate }}">
6-
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}">
6+
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}" mm-external-content>
77
<span ng-if="profileLink === true" class="button button-icon icon ion-person"></span>
88
</a>
99
</ion-nav-buttons>

www/addons/messages/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ion-view view-title="{{ 'mma.messages.messages' | translate }}">
22
<ion-nav-buttons side="secondary">
33
<a ng-if="profileLink" mm-user-link userid="{{userId}}" aria-label="{{ 'mm.user.viewprofile' | translate }}">
4-
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}">
4+
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}" mm-external-content>
55
<span ng-if="profileLink === true" class="button button-icon icon ion-person"></span>
66
</a>
77
</ion-nav-buttons>

0 commit comments

Comments
 (0)