Remember the state of collapsed/open menus on home tab
This commit is contained in:
parent
e28d85ee46
commit
f945b0f9a7
5 changed files with 39 additions and 7 deletions
|
|
@ -1,8 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('servicesController', function($scope, $ionicScrollDelegate, $timeout, servicesService) {
|
||||
|
||||
angular.module('copayApp.controllers').controller('servicesController', function($scope, $ionicScrollDelegate, $timeout, servicesService, configService) {
|
||||
$scope.hide = false;
|
||||
|
||||
configService.whenAvailable(function(config) {
|
||||
$scope.hide = config.homeSectionIsHidden&&config.homeSectionIsHidden['services']?config.homeSectionIsHidden['services']:false;
|
||||
});
|
||||
|
||||
$scope.services = servicesService.get();
|
||||
|
||||
$scope.toggle = function() {
|
||||
|
|
@ -10,6 +14,9 @@ angular.module('copayApp.controllers').controller('servicesController', function
|
|||
$timeout(function() {
|
||||
$ionicScrollDelegate.resize();
|
||||
$scope.$apply();
|
||||
configService.set({homeSectionIsHidden: {services: $scope.hide}}, function(err) {
|
||||
if (err) $log.debug(err);
|
||||
});
|
||||
}, 10);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue