ios fixes
This commit is contained in:
parent
3320510d35
commit
b29fab9ae2
3 changed files with 4 additions and 16 deletions
|
|
@ -32,7 +32,6 @@
|
|||
<!-- Plugins -->
|
||||
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
|
||||
<plugin name="cordova-plugin-globalization" spec="~1.0.4" />
|
||||
<plugin name="cordova.plugins.diagnostic" spec="~3.2.1" />
|
||||
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
|
||||
<plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
|
||||
<plugin name="cordova-plugin-inappbrowser" spec="~1.5.0" />
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
|
|||
var isCordova = platformInfo.isCordova;
|
||||
var isIOS = platformInfo.isIOS;
|
||||
|
||||
$scope.appName = $window.appConfig.nameCase;
|
||||
$scope.PNEnabledByUser = true;
|
||||
$scope.isIOSApp = isIOS && isCordova;
|
||||
if ($scope.isIOSApp) {
|
||||
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
|
||||
$scope.PNEnabledByUser = isEnabled;
|
||||
$scope.$digest();
|
||||
PushNotification.hasPermission(function(data) {
|
||||
$scope.PNEnabledByUser = data.isEnabled;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -23,14 +23,6 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr
|
|||
};
|
||||
};
|
||||
|
||||
$scope.openSettings = function() {
|
||||
cordova.plugins.diagnostic.switchToSettings(function() {
|
||||
$log.debug('switched to settings');
|
||||
}, function(err) {
|
||||
$log.debug(err);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.pushNotificationsChange = function() {
|
||||
var opts = {
|
||||
pushNotifications: {
|
||||
|
|
|
|||
|
|
@ -18,11 +18,8 @@
|
|||
<div ng-show="!PNEnabledByUser && isIOSApp">
|
||||
<div class="item item-divider" translate>Notifications</div>
|
||||
<div class="padding text-light" translate>
|
||||
Push notifications for Copay are currently disabled. Enable them in the Settings app.
|
||||
Push notifications for {{appName}} are currently disabled. Enable them in the Settings app.
|
||||
</div>
|
||||
<a class="item" ng-click="openSettings()">
|
||||
<span translate>Open Settings app</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue