Move small_avatar_url() to people.js.

This commit is contained in:
Steve Howell
2017-01-21 11:29:39 -08:00
committed by Tim Abbott
parent 4eb1a8f07d
commit e7e2e388c5
5 changed files with 23 additions and 23 deletions

View File

@@ -259,24 +259,6 @@ exports.show_failed_message_success = function (message_id) {
});
};
exports.small_avatar_url = function (message) {
// Try to call this function in all places where we need 25px
// avatar images, so that the browser can help
// us avoid unnecessary network trips. (For user-uploaded avatars,
// the s=25 parameter is essentially ignored, but it's harmless.)
//
// We actually request these at s=50, so that we look better
// on retina displays.
if (message.avatar_url) {
var url = message.avatar_url + "&s=50";
if (message.sent_by_me) {
url += "&stamp=" + settings.avatar_stamp;
}
return url;
}
return "";
};
exports.lightbox = function (data) {
switch (data.type) {
case "photo":