Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #32411 from gmarty/Bug-1196809-Pick-best-available…
Browse files Browse the repository at this point in the history
…-icon-for-pinned-sites-on-homescreen-hotfix

Bug 1196809 - Fix bad reference to id property. r=cwiis
  • Loading branch information
BavarianTomcat committed Oct 13, 2015
2 parents a9ee136 + cf5ee8f commit fde07d1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/homescreen/js/app.js
Expand Up @@ -935,7 +935,7 @@ const BLACKLIST = [];
id = this.getIconId(icon.app ? icon.app : icon.bookmark,
icon.entryPoint);
if (id === this.iconsToRetry[i]) {
if (icon.id) {
if (icon.bookmark) {
this.setBookmarkIcon(icon);
} else {
icon.refresh();
Expand Down
Expand Up @@ -71,8 +71,7 @@ marionette('Vertical Home - Hosted app cached icon fetch', function() {

// check for the cached icon...
client.waitFor(function() {
return iconSrc(icon) ===
'/shared/elements/gaia_grid/images/default_icon.png';
return iconSrc(icon) === 'blobcache';
});

// allow the request to succeed
Expand Down
4 changes: 2 additions & 2 deletions shared/elements/gaia-site-icon/.bower.json
Expand Up @@ -21,11 +21,11 @@
"tests"
],
"homepage": "https://github.com/gaia-components/gaia-site-icon",
"_release": "2c5b344e05",
"_release": "a77175df04",
"_resolution": {
"type": "branch",
"branch": "master",
"commit": "2c5b344e05f3431fe723c33644439b740810269b"
"commit": "a77175df04655c5c5a730d0655bc7bf7c4ccfd55"
},
"_source": "git://github.com/gaia-components/gaia-site-icon.git",
"_target": "*",
Expand Down
8 changes: 4 additions & 4 deletions shared/elements/gaia-site-icon/script.js
Expand Up @@ -291,16 +291,16 @@ window.GaiaAppIcon = (function(exports) {
this._image = null;
this._hasIcon = true;

if (!this._hasPredefinedIcon) {
this.dispatchEvent(new CustomEvent('icon-loaded'));
}

// Set icon URL on dataset, for testing.
if (this._pendingIconUrl) {
this._iconUrl = this.dataset.testIconUrl = this._pendingIconUrl;
this._pendingIconUrl = null;
}

if (!this._hasPredefinedIcon) {
this.dispatchEvent(new CustomEvent('icon-loaded'));
}

if (this._pendingIconRefresh) {
this._image = null;
this._pendingIconRefresh = false;
Expand Down

0 comments on commit fde07d1

Please sign in to comment.