From 3696f587f46a6d596bc8c0e9891566edbaf0ca63 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 23 Mar 2017 17:09:48 +0100 Subject: android --- StoneIsland/platforms/ios/www/js/lib/etc/push.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'StoneIsland/platforms/ios/www/js/lib/etc/push.js') diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/push.js b/StoneIsland/platforms/ios/www/js/lib/etc/push.js index 138c4896..da63fdd1 100755 --- a/StoneIsland/platforms/ios/www/js/lib/etc/push.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/push.js @@ -1,7 +1,11 @@ var push = (function(){ - var push = { settings: {} } + var push = { settings: {}, disabled: false } var pushPlugin push.init = function(){ + if (device.platform !== "ios") { + push.disabled = true + return + } pushPlugin = PushNotification.init({ ios: { @@ -50,6 +54,7 @@ var push = (function(){ } } push.subscribe = function(channel, cb){ + if (push.disabled) return push.settings[channel] = true localStorage.setItem("yoox.push_" + channel, "true") var data = { @@ -73,6 +78,7 @@ var push = (function(){ }) } push.unsubscribe = function(channel, cb){ + if (push.disabled) return push.settings[channel] = false localStorage.setItem("yoox.push_" + channel, "false") var data = { -- cgit v1.2.3-70-g09d2