diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/cards.js | 7 | ||||
-rw-r--r-- | models/users.js | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/models/cards.js b/models/cards.js index 27dda0ee..1c56a6d2 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1696,10 +1696,11 @@ if (Meteor.isServer) { const activityType = `a-${action}`; const card = Cards.findOne(doc._id); const list = card.list(); - if (list && action === 'endAt') { - // change list modifiedAt + if (list) { + // change list modifiedAt, when user modified the key values in timingaction array, if it's endAt, put the modifiedAt of list back to one year ago for sorting purpose const modifiedAt = new Date( - new Date(value).getTime() - 365 * 24 * 3600 * 1e3, + new Date(value).getTime() - + (action === 'endAt' ? 365 * 24 * 3600 * 1e3 : 0), ); // set it as 1 year before const boardId = list.boardId; Lists.direct.update( diff --git a/models/users.js b/models/users.js index 72d64c1c..83a224ba 100644 --- a/models/users.js +++ b/models/users.js @@ -396,8 +396,8 @@ Users.helpers({ return ret; }, hasSortBy() { - // if use has dragHandle, then we can let user to choose sort list by different order - return this.hasShowDesktopDragHandles(); + // if use doesn't have dragHandle, then we can let user to choose sort list by different order + return !this.hasShowDesktopDragHandles(); }, getListSortBy() { return this._getListSortBy()[0]; |