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