mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-25 13:01:00 +00:00
Update settingsCtrl.js
This commit is contained in:
parent
207975f592
commit
f7727eef23
1 changed files with 10 additions and 0 deletions
|
|
@ -15,6 +15,16 @@ habitrpg.controller('SettingsCtrl',
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
$scope.hideHeader = function(){
|
||||||
|
User.set({"preferences.hideHeader":!User.user.preferences.hideHeader})
|
||||||
|
if (User.user.preferences.hideHeader && User.user.preferences.stickyHeader){
|
||||||
|
User.set({"preferences.stickyHeader":false});
|
||||||
|
$rootScope.$on('userSynced', function(){
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$scope.toggleStickyHeader = function(){
|
$scope.toggleStickyHeader = function(){
|
||||||
$rootScope.$on('userSynced', function(){
|
$rootScope.$on('userSynced', function(){
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue