From 336e04a0c18253f153135a9468b3788da63ea04a Mon Sep 17 00:00:00 2001 From: Josef Citrine Date: Mon, 20 Jun 2016 01:38:07 +0100 Subject: [PATCH] Disabling notifications until they're stable on Chrome --- app/Jobs/SendNotifications.php | 2 +- .../assets/scripts/app/directives/notification-list.coffee | 4 ++-- resources/assets/scripts/app/services/notifications.coffee | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Jobs/SendNotifications.php b/app/Jobs/SendNotifications.php index 9d71b30e..53d1080d 100644 --- a/app/Jobs/SendNotifications.php +++ b/app/Jobs/SendNotifications.php @@ -62,7 +62,7 @@ class SendNotifications extends Job implements SelfHandling, ShouldQueue // tries (and fails) to serialize static fields. $drivers = [ PonyfmDriver::class, - NativeDriver::class + //NativeDriver::class ]; foreach ($drivers as $driver) { diff --git a/resources/assets/scripts/app/directives/notification-list.coffee b/resources/assets/scripts/app/directives/notification-list.coffee index d67d64eb..df036da2 100644 --- a/resources/assets/scripts/app/directives/notification-list.coffee +++ b/resources/assets/scripts/app/directives/notification-list.coffee @@ -26,7 +26,7 @@ module.exports = angular.module('ponyfm').directive 'pfmNotificationList', () -> $scope.notifications = [] $scope.subscribed = false $scope.switchDisabled = true - $scope.switchHidden = false + $scope.switchHidden = true isTimeoutScheduled = false # TODO: ADD REFRESH BUTTON @@ -85,6 +85,6 @@ module.exports = angular.module('ponyfm').directive 'pfmNotificationList', () -> isTimeoutScheduled = false , 60000) - checkSubscription() + #checkSubscription() refreshNotifications() ] diff --git a/resources/assets/scripts/app/services/notifications.coffee b/resources/assets/scripts/app/services/notifications.coffee index 9904e157..9a5895a8 100644 --- a/resources/assets/scripts/app/services/notifications.coffee +++ b/resources/assets/scripts/app/services/notifications.coffee @@ -142,7 +142,7 @@ module.exports = angular.module('ponyfm').factory('notifications', [ return false # If Chrome 50+ - if !!window.chrome && !!window.chrome.webstore + if !!window.chrome if parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2]) >= 50 return true # If Firefox 46+