Move every Boards.findOne(Session.get('currentBoard')) to the ReactiveCache

This commit is contained in:
Martin Filser 2022-12-15 22:26:08 +01:00
parent cecf69af02
commit 9022e9949f
18 changed files with 69 additions and 69 deletions

View file

@ -2,7 +2,7 @@ import { ReactiveCache } from '/imports/reactiveCache';
Utils = {
setBackgroundImage(url) {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
const currentBoard = Utils.getCurrentBoard();
if (currentBoard.backgroundImageURL !== undefined) {
$(".board-wrapper,.board-wrapper .board-canvas").css({"background":"url(" + currentBoard.backgroundImageURL + ")","background-size":"cover"});
$(".swimlane,.swimlane .list,.swimlane .list .list-body,.swimlane .list:first-child .list-body").css({"background-color":"transparent"});
@ -439,7 +439,7 @@ Utils = {
},
setCustomUI(data) {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
const currentBoard = Utils.getCurrentBoard();
if (currentBoard) {
DocHead.setTitle(`${currentBoard.title} - ${data.productName}`);
} else {