From 612052e5ca993dcf185c784157eafac6b17d4c7b Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 16 Jan 2015 15:48:57 +0400 Subject: [PATCH] Posts notification option check fix. --- chrome_point_plus/js/point-plus.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/chrome_point_plus/js/point-plus.js b/chrome_point_plus/js/point-plus.js index ed6e204..3460390 100644 --- a/chrome_point_plus/js/point-plus.js +++ b/chrome_point_plus/js/point-plus.js @@ -486,16 +486,17 @@ $(document).ready(function() { console.groupCollapsed('ws-post #%s', wsMessage.post_id); console.debug(wsMessage); - - if (options.is('option_ws_posts_notifications')) { - console.log('Showing desktop notification'); - chrome.runtime.sendMessage({ - type: 'showNotification', - notificationId: 'post_' + wsMessage.post_id, - avatarUrl: getProtocol() + '//point.im/avatar/' + wsMessage.author + '/80', - title: 'Post by @' + wsMessage.author + ' #' + wsMessage.post_id, - text: wsMessage.text - }, function(response) {}); + if (options.is('option_ws_posts')) { + if (options.is('option_ws_posts_notifications')) { + console.log('Showing desktop notification'); + chrome.runtime.sendMessage({ + type: 'showNotification', + notificationId: 'post_' + wsMessage.post_id, + avatarUrl: getProtocol() + '//point.im/avatar/' + wsMessage.author + '/80', + title: 'Post by @' + wsMessage.author + ' #' + wsMessage.post_id, + text: wsMessage.text + }, function(response) {}); + } } console.groupEnd();