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 -->
|
<!-- Plugins -->
|
||||||
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
|
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
|
||||||
<plugin name="cordova-plugin-globalization" spec="~1.0.4" />
|
<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-splashscreen" spec="~4.0.0" />
|
||||||
<plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
|
<plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
|
||||||
<plugin name="cordova-plugin-inappbrowser" spec="~1.5.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 isCordova = platformInfo.isCordova;
|
||||||
var isIOS = platformInfo.isIOS;
|
var isIOS = platformInfo.isIOS;
|
||||||
|
|
||||||
|
$scope.appName = $window.appConfig.nameCase;
|
||||||
$scope.PNEnabledByUser = true;
|
$scope.PNEnabledByUser = true;
|
||||||
$scope.isIOSApp = isIOS && isCordova;
|
$scope.isIOSApp = isIOS && isCordova;
|
||||||
if ($scope.isIOSApp) {
|
if ($scope.isIOSApp) {
|
||||||
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
|
PushNotification.hasPermission(function(data) {
|
||||||
$scope.PNEnabledByUser = isEnabled;
|
$scope.PNEnabledByUser = data.isEnabled;
|
||||||
$scope.$digest();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -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() {
|
$scope.pushNotificationsChange = function() {
|
||||||
var opts = {
|
var opts = {
|
||||||
pushNotifications: {
|
pushNotifications: {
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,8 @@
|
||||||
<div ng-show="!PNEnabledByUser && isIOSApp">
|
<div ng-show="!PNEnabledByUser && isIOSApp">
|
||||||
<div class="item item-divider" translate>Notifications</div>
|
<div class="item item-divider" translate>Notifications</div>
|
||||||
<div class="padding text-light" translate>
|
<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>
|
</div>
|
||||||
<a class="item" ng-click="openSettings()">
|
|
||||||
<span translate>Open Settings app</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue