summaryrefslogtreecommitdiffstats
path: root/client/components/lists/list.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/lists/list.js')
-rw-r--r--client/components/lists/list.js29
1 files changed, 23 insertions, 6 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index 8433ad90..7a51fc6e 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -119,7 +119,19 @@ BlazeComponent.extendComponent({
const cookies = new Cookies();
this.autorun(() => {
- if (!Utils.isMiniScreen() && cookies.has('showDesktopDragHandles')) {
+ let showDesktopDragHandles = false;
+ currentUser = Meteor.user();
+ if (currentUser) {
+ showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles;
+ } else {
+ if (cookies.has('showDesktopDragHandles')) {
+ showDesktopDragHandles = true;
+ } else {
+ showDesktopDragHandles = false;
+ }
+ }
+
+ if (!Utils.isMiniScreen() && showDesktopDragHandles) {
$cards.sortable({
handle: '.handle',
});
@@ -163,12 +175,17 @@ BlazeComponent.extendComponent({
Template.list.helpers({
showDesktopDragHandles() {
- import { Cookies } from 'meteor/ostrio:cookies';
- const cookies = new Cookies();
- if (cookies.has('showDesktopDragHandles')) {
- return true;
+ currentUser = Meteor.user();
+ if (currentUser) {
+ return (currentUser.profile || {}).showDesktopDragHandles;
} else {
- return false;
+ import { Cookies } from 'meteor/ostrio:cookies';
+ const cookies = new Cookies();
+ if (cookies.has('showDesktopDragHandles')) {
+ return true;
+ } else {
+ return false;
+ }
}
},
});