Drag handle toggle at top left: Each touch/non-touch screen can

use different setting, because it's saved to browser localstorage,
not database. For example, when using Firefox Multi-Account Containers AddOn,
different browsers etc, when logged in as same user.

Thanks to hatl and xet7 !

Fixes #4715
This commit is contained in:
Lauri Ojansivu 2022-10-23 15:17:41 +03:00
parent 2d16e35ac4
commit e214bc55dc
5 changed files with 38 additions and 11 deletions

View file

@ -288,10 +288,11 @@ Utils = {
// returns if desktop drag handles are enabled
isShowDesktopDragHandles() {
const currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).showDesktopDragHandles;
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
//const currentUser = Meteor.user();
//if (currentUser) {
// return (currentUser.profile || {}).showDesktopDragHandles;
//} else if (window.localStorage.getItem('showDesktopDragHandles')) {
if (window.localStorage.getItem('showDesktopDragHandles')) {
return true;
} else {
return false;
@ -300,7 +301,8 @@ Utils = {
// returns if mini screen or desktop drag handles
isTouchScreenOrShowDesktopDragHandles() {
return this.isTouchScreen() || this.isShowDesktopDragHandles();
//return this.isTouchScreen() || this.isShowDesktopDragHandles();
return this.isShowDesktopDragHandles();
},
calculateIndexData(prevData, nextData, nItems = 1) {