Browse Source

don't store avatar to local storage if it is 'img/genericPerson.png', #339

readme-update
Simon Grim 9 years ago
parent
commit
57cc22a2fc
  1. 3
      js/twister_io.js

3
js/twister_io.js

@ -389,7 +389,8 @@ function getAvatar(username, img) {
function(req, imagedata) { function(req, imagedata) {
if (imagedata && imagedata.length) { if (imagedata && imagedata.length) {
_avatarMap[req.username] = imagedata; _avatarMap[req.username] = imagedata;
_putResourceIntoStorage('avatar:' + username, imagedata); if (imagedata !== 'img/genericPerson.png')
_putResourceIntoStorage('avatar:' + username, imagedata);
req.img.attr('src', imagedata); req.img.attr('src', imagedata);
} }
}, {username: username, img: img} }, {username: username, img: img}

Loading…
Cancel
Save