mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 21:23:19 +02:00
Merge pull request #631 from vegaslon/bug/TestFixAvatarApp
Test moving to qt image error handling in avatar app
This commit is contained in:
commit
c7fbddf024
1 changed files with 0 additions and 16 deletions
|
@ -37,17 +37,6 @@ ListModel {
|
|||
return trimmedUrl;
|
||||
}
|
||||
|
||||
function imageExists(imageUrl) {
|
||||
|
||||
var http = new XMLHttpRequest();
|
||||
|
||||
http.open('HEAD', imageUrl, false);
|
||||
http.send();
|
||||
|
||||
return http.status !== 404;
|
||||
|
||||
}
|
||||
|
||||
function makeThumbnailUrl(avatarUrl) {
|
||||
var marketId = extractMarketId(avatarUrl);
|
||||
if (marketId !== '') {
|
||||
|
@ -55,11 +44,6 @@ ListModel {
|
|||
}
|
||||
|
||||
var avatarThumbnailFileUrl = trimFileExtension(avatarUrl) + ".jpg";
|
||||
var thumbnailExist = imageExists(avatarThumbnailFileUrl);
|
||||
|
||||
if (!thumbnailExist) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return avatarThumbnailFileUrl;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue