set 24 hours timer
This commit is contained in:
parent
80888f63a1
commit
ac9cee8d6d
5 changed files with 22 additions and 7 deletions
|
|
@ -42,8 +42,6 @@ angular.module('copayApp.controllers').controller('rateCardController', function
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.cancel = function() {};
|
|
||||||
|
|
||||||
$scope.hideCard = function() {
|
$scope.hideCard = function() {
|
||||||
if ($scope.isModal) {
|
if ($scope.isModal) {
|
||||||
$scope.rateModal.hide();
|
$scope.rateModal.hide();
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ angular.module('copayApp.controllers').controller('sendFeedbackController', func
|
||||||
|
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
var dataSrc = {
|
var dataSrc = {
|
||||||
"entry.490635314": lodash.values(config.emailFor)[0] || 'no email setted',
|
"entry.490635314": lodash.values(config.emailFor)[0] || ' ',
|
||||||
"entry.1447064148": skip ? '-' : feedback,
|
"entry.1447064148": skip ? ' ' : feedback,
|
||||||
"entry.2142850951": $stateParams.score
|
"entry.2142850951": $stateParams.score
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService, startupService) {
|
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService, startupService, storageService) {
|
||||||
|
|
||||||
$ionicConfig.views.swipeBackEnabled(false);
|
$ionicConfig.views.swipeBackEnabled(false);
|
||||||
|
|
||||||
|
|
@ -19,7 +19,13 @@ angular.module('copayApp.controllers').controller('welcomeController', function(
|
||||||
$log.debug('Creating profile');
|
$log.debug('Creating profile');
|
||||||
profileService.createProfile(function(err) {
|
profileService.createProfile(function(err) {
|
||||||
if (err) $log.warn(err);
|
if (err) $log.warn(err);
|
||||||
|
$scope.setProfileCreationTime();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.setProfileCreationTime = function() {
|
||||||
|
var now = moment().unix() * 1000 + 24 * 60 * 60 * 1000;
|
||||||
|
storageService.setProfileCreationTime(now, function() {});
|
||||||
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,11 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
storageService.getRateCardFlag(function(error, value) {
|
storageService.getProfileCreationTime(function(error, time) {
|
||||||
$scope.hideRateCard.value = (value == 'true') ? true : false;
|
var now = moment().unix() * 1000;
|
||||||
|
storageService.getRateCardFlag(function(error, value) {
|
||||||
|
$scope.hideRateCard.value = (value == 'true' || (time - now) > 0) ? true : false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,14 @@ angular.module('copayApp.services')
|
||||||
storage.remove('profile', cb);
|
storage.remove('profile', cb);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
root.setProfileCreationTime = function(time, cb) {
|
||||||
|
storage.set('profileCreationTime', time, cb);
|
||||||
|
};
|
||||||
|
|
||||||
|
root.getProfileCreationTime = function(cb) {
|
||||||
|
storage.get('profileCreationTime', cb);
|
||||||
|
};
|
||||||
|
|
||||||
root.storeFocusedWalletId = function(id, cb) {
|
root.storeFocusedWalletId = function(id, cb) {
|
||||||
storage.set('focusedWalletId', id || '', cb);
|
storage.set('focusedWalletId', id || '', cb);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue