From df8c82f6b4e46d7325d91090000bf6ac67c5fbfb Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 7 May 2015 17:45:51 -0600 Subject: [PATCH] Fixes #1367 (Safari badge alignment) --- platform/safari/vapi-background.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/safari/vapi-background.js b/platform/safari/vapi-background.js index 8f8c6f467..6baece097 100644 --- a/platform/safari/vapi-background.js +++ b/platform/safari/vapi-background.js @@ -539,7 +539,6 @@ state.active = true; // force re-render since we probably switched tabs state.dirty = (1 << 1) | (1 << 0); - renderIcon(state); }, true); @@ -564,9 +563,11 @@ return; } var icon = iconState.icon; - icon.badge = iconState.badge; // only update the image if needed: - if(iconState.dirty & 1) { + if(iconState.dirty & 2) { + icon.badge = iconState.badge; + } + if(iconState.dirty & 1 && icon.image !== ICON_URLS[iconState.img]) { icon.image = ICON_URLS[iconState.img]; } iconState.dirty = 0;