summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardHeader.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards/boardHeader.js')
-rw-r--r--client/components/boards/boardHeader.js18
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'() {