Supress change event on avatarUrl initialization
This commit is contained in:
@@ -222,7 +222,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateAvatarUrl: function() {
|
updateAvatarUrl: function(silent) {
|
||||||
this.revokeAvatarUrl();
|
this.revokeAvatarUrl();
|
||||||
var avatar = this.get('avatar');
|
var avatar = this.get('avatar');
|
||||||
if (avatar) {
|
if (avatar) {
|
||||||
@@ -232,12 +232,14 @@
|
|||||||
} else {
|
} else {
|
||||||
this.avatarUrl = null;
|
this.avatarUrl = null;
|
||||||
}
|
}
|
||||||
this.trigger('change');
|
if (!silent) {
|
||||||
|
this.trigger('change');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getAvatarUrl: function() {
|
getAvatarUrl: function() {
|
||||||
if (this.avatarUrl === undefined) {
|
if (this.avatarUrl === undefined) {
|
||||||
this.updateAvatarUrl();
|
this.updateAvatarUrl(true);
|
||||||
}
|
}
|
||||||
return this.avatarUrl || '/images/default.png';
|
return this.avatarUrl || '/images/default.png';
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user