Merge pull request #326 from Bitcoin-com/wallet/task/562
Bug - 562 - No notification when a new release version is available (Mac OSX github)
This commit is contained in:
commit
9c0b54a7ce
5 changed files with 217 additions and 90 deletions
|
|
@ -43,21 +43,20 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
});
|
||||
}
|
||||
|
||||
if ($scope.isNW) {
|
||||
latestReleaseService.checkLatestRelease(function(err, newRelease) {
|
||||
if (err) {
|
||||
$log.warn(err);
|
||||
return;
|
||||
}
|
||||
if (newRelease) {
|
||||
$scope.newRelease = true;
|
||||
$scope.updateText = gettextCatalog.getString('There is a new version of {{appName}} available', {
|
||||
appName: $scope.name
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
latestReleaseService.checkLatestRelease(function(err, newReleaseData) {
|
||||
if (err) {
|
||||
$log.warn(err);
|
||||
return;
|
||||
}
|
||||
if (newReleaseData) {
|
||||
$scope.newRelease = true;
|
||||
$scope.newReleaseText = gettextCatalog.getString('There is a new version of {{appName}} available', {
|
||||
appName: $scope.name
|
||||
});
|
||||
$scope.newReleaseNotes = newReleaseData.releaseNotes;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function onEnter(event, data) {
|
||||
$ionicNavBarDelegate.showBar(true);
|
||||
|
|
@ -109,13 +108,13 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
$scope.$apply();
|
||||
}, 10);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function onLeave (event, data) {
|
||||
lodash.each(listeners, function(x) {
|
||||
x();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
$scope.createdWithinPastDay = function(time) {
|
||||
return timeService.withinPastDay(time);
|
||||
|
|
@ -125,14 +124,8 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
sendFlowService.start();
|
||||
}
|
||||
|
||||
$scope.openExternalLink = function() {
|
||||
var url = 'https://github.com/Bitcoin-com/Wallet/releases/latest';
|
||||
var optIn = true;
|
||||
var title = gettextCatalog.getString('Update Available');
|
||||
var message = gettextCatalog.getString('An update to this app is available. For your security, please update to the latest version.');
|
||||
var okText = gettextCatalog.getString('View Update');
|
||||
var cancelText = gettextCatalog.getString('Go Back');
|
||||
externalLinkService.open(url, optIn, title, message, okText, cancelText);
|
||||
$scope.showUpdatePopup = function() {
|
||||
latestReleaseService.showUpdatePopup();
|
||||
};
|
||||
|
||||
$scope.openBannerUrl = function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue