Skip to content

Commit

Permalink
v6.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneys committed Mar 31, 2018
1 parent 62526e6 commit b39ff37
Show file tree
Hide file tree
Showing 18 changed files with 510 additions and 263 deletions.
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
os: Visual Studio 2015
os: Visual Studio 2017

platform:
- x64
Expand All @@ -20,7 +20,7 @@ init:

install:
- cmd: echo 🔧 Setting up Node
- ps: Install-Product node 9
- ps: Install-Product node 9.8.0
- cmd: npm --global update npm
- cmd: npm --global install yarn

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ before_install:
- echo "🚦 Authorizing Build"
- echo "🔧 Setting up Node"
- curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | NVM_DIR="${HOME}"/.nvm sh
- source "${HOME}"/.nvm/nvm.sh && nvm install 9.3.0 && nvm use 9.3.0
- source "${HOME}"/.nvm/nvm.sh && nvm install 9.10.1 && nvm use 9.10.1
- npm --global update npm
- npm --global install yarn

Expand Down
13 changes: 13 additions & 0 deletions RELEASENOTES.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
{
"6.9.1": {
"🍾 features": [
"Integrates `PB for Desktop's` dedicated favicon provider backend, powered by [Heroku](https://pb-for-desktop-besticon.herokuapp.com)"
],
"💎 improvements": [
"Reduces latency between notification rendering and playback of notification sound effects",
"Improves error-handling of favicon content-delivery backend",
"Various stability and performance improvements"
],
"👷 internals": [
"Upgrades `node_modules`"
]
},
"6.9.0": {
"🍾 features": [
"Accessibility: Adds application-level keyboard navigation",
Expand Down
52 changes: 25 additions & 27 deletions app/scripts/renderer/pushbullet/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const appTemporaryDirectory = (isDebug && process.defaultApp) ? appRootPath : os
* Urls
* @constant
*/
const besticonUrl = 'besticon-demo.herokuapp.com';
const besticonEndpointUrl = 'pb-for-desktop-besticon.herokuapp.com';
const pushbulletUrl = 'www.pushbullet.com';
const youtubeUrl = 'img.youtube.com';

Expand Down Expand Up @@ -263,7 +263,7 @@ let generateImageUrl = (push) => {
if (getYouTubeID(push['url'])) {
iconWebsite = `http://${youtubeUrl}/vi/${getYouTubeID(push['url'])}/hqdefault.jpg`;
} else {
iconWebsite = `https://${besticonUrl}/icon?fallback_icon_color=4AB367&formats=ico,png&size=1..${faviconImageSize}..200&url=${push['url']}`;
iconWebsite = `https://${besticonEndpointUrl}/icon?fallback_icon_color=4AB367&formats=ico,png&size=1..${faviconImageSize}..200&url=${push['url']}`;
}
}

Expand Down Expand Up @@ -436,11 +436,11 @@ let decoratePushbulletPush = (push) => {
* @param {Object} notificationOptions - NotificationConfiguration
* @param {Object=} pushObject - Pushbullet Push
*/
let showNotification = (notificationOptions, pushObject) => {
logger.debug('showNotification');
let renderNotification = (notificationOptions, pushObject) => {
logger.debug('renderNotification');

/**
* Create
* Create notification
*/
const notification = notificationProvider.create(notificationOptions);

Expand Down Expand Up @@ -495,10 +495,19 @@ let showNotification = (notificationOptions, pushObject) => {
logger.debug('notification#show', event);
});


/**
* Show
* Show notification
*/
notification.show();


/**
* Play sound
*/
if (retrievePushbulletSoundEnabled()) {
playSound(retrievePushbulletSoundFile());
}
};

/**
Expand Down Expand Up @@ -580,11 +589,7 @@ let convertPushToNotification = (push) => {
* Image: None
*/
if (!imageProtocol) {
if (retrievePushbulletSoundEnabled()) {
playSound(retrievePushbulletSoundFile());
}

showNotification(notificationOptions, push);
renderNotification(notificationOptions, push);

return;
}
Expand All @@ -596,12 +601,8 @@ let convertPushToNotification = (push) => {
writeResizeImage(imageDataURI.decode(imageUrl).dataBuffer, imageFilepathTemporary, (error, imageFilepathConverted) => {
if (error) { return; }

if (retrievePushbulletSoundEnabled()) {
playSound(retrievePushbulletSoundFile());
}

notificationOptions.icon = imageFilepathConverted;
showNotification(notificationOptions, push);
renderNotification(notificationOptions, push);
});

return;
Expand All @@ -628,12 +629,8 @@ let convertPushToNotification = (push) => {
writeResizeImage(imageBuffer, imageFilepathDownloaded, (error, imageFilepathConverted) => {
if (error) { return; }

if (retrievePushbulletSoundEnabled()) {
playSound(retrievePushbulletSoundFile());
}

notificationOptions.icon = imageFilepathConverted;
showNotification(notificationOptions, push);
renderNotification(notificationOptions, push);
});

return;
Expand All @@ -648,19 +645,20 @@ let convertPushToNotification = (push) => {
writeResizeImage(Buffer.from(imageMaximum.buffer), imageFilepathDownloaded, (error, imageFilepathConverted) => {
if (error) { return; }

if (retrievePushbulletSoundEnabled()) {
playSound(retrievePushbulletSoundFile());
}

notificationOptions.icon = imageFilepathConverted;
showNotification(notificationOptions, push);
renderNotification(notificationOptions, push);
});
});
}

})
/**
* Image Downloader failed: Fallback to AppIcon
*/
.catch((error) => {
logger.error('convertPushToNotification', error);
logger.warn('convertPushToNotification', 'imageDownloader', error);

renderNotification(notificationOptions, push);
});
};

Expand Down
Loading

0 comments on commit b39ff37

Please sign in to comment.