isMiniScreen and showDesktopDragHandles centralized in class Utils

- a lot of same code everywhere in many files, this is against the
  concept "don't repeat yourself"
This commit is contained in:
Martin Filser 2021-10-13 13:49:15 +02:00
parent cbc6463019
commit b9178cfcb6
12 changed files with 14 additions and 126 deletions

View file

@ -248,6 +248,8 @@ Utils = {
const currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).showDesktopDragHandles;
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
return true;
} else {
return false;
}