diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2018-04-16 14:33:53 -0300 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2018-04-16 14:43:10 -0300 |
commit | e5995477b80a3c8e9fd423d14fd818a5b3ad5aa0 (patch) | |
tree | 420339982c4f9903e4f193ee19ac177a766ed330 /client/components/boards/boardHeader.js | |
parent | c12e003fd3ecc50bee64931bc19febee1b99c103 (diff) | |
download | wekan-e5995477b80a3c8e9fd423d14fd818a5b3ad5aa0.tar.gz wekan-e5995477b80a3c8e9fd423d14fd818a5b3ad5aa0.tar.bz2 wekan-e5995477b80a3c8e9fd423d14fd818a5b3ad5aa0.zip |
Fix #1567
Diffstat (limited to 'client/components/boards/boardHeader.js')
-rw-r--r-- | client/components/boards/boardHeader.js | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js index 64cb0a54..2b587831 100644 --- a/client/components/boards/boardHeader.js +++ b/client/components/boards/boardHeader.js @@ -77,19 +77,11 @@ BlazeComponent.extendComponent({ Modal.open('archivedBoards'); }, 'click .js-toggle-board-view'() { - const currentBoard = Boards.findOne(Session.get('currentBoard')); - if (currentBoard.view === 'board-view-swimlanes') { - Boards.update(currentBoard._id, { - $set: { - view: 'board-view-lists', - }, - }); - } else if (currentBoard.view === 'board-view-lists') { - Boards.update(currentBoard._id, { - $set: { - view: 'board-view-swimlanes', - }, - }); + const currentUser = Meteor.user(); + if (currentUser.profile.boardView === 'board-view-swimlanes') { + currentUser.setBoardView('board-view-lists'); + } else if (currentUser.profile.boardView === 'board-view-lists') { + currentUser.setBoardView('board-view-swimlanes'); } }, 'click .js-open-filter-view'() { |