mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Use "?" instead of user ID as seed for the image placeholder
The seed of the image placeholder is needed to generate the background color of the image, but as the background color is later overriden any seed could be used. When no text is explicitly given the seed is used as text too, so there is no need to pass the user ID and simply using "?" as seed is enough. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
ff71dd07a6
commit
ea10a1292a
2 changed files with 2 additions and 2 deletions
|
|
@ -113,7 +113,7 @@
|
|||
$div.imageplaceholder(user, result.data.displayname);
|
||||
} else {
|
||||
// User does not exist
|
||||
$div.imageplaceholder(user, '?');
|
||||
$div.imageplaceholder('?');
|
||||
$div.css('background-color', '#b9b9b9');
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ describe('jquery.avatar tests', function() {
|
|||
})
|
||||
);
|
||||
|
||||
expect($div.imageplaceholder).toHaveBeenCalledWith('foo', '?');
|
||||
expect($div.imageplaceholder).toHaveBeenCalledWith('?');
|
||||
expect($div.css).toHaveBeenCalledWith('background-color', '#b9b9b9');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue