mirror of
https://github.com/wekan/wekan.git
synced 2025-12-31 14:48:48 +01:00
Move every Lists.findOne() to the ReactiveCache
This commit is contained in:
parent
06e26d8d89
commit
0926943670
9 changed files with 17 additions and 16 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { DialogWithBoardSwimlaneList } from '/client/lib/dialogWithBoardSwimlaneList';
|
||||
|
||||
export class DialogWithBoardSwimlaneListCard extends DialogWithBoardSwimlaneList {
|
||||
|
|
@ -22,7 +23,7 @@ export class DialogWithBoardSwimlaneListCard extends DialogWithBoardSwimlaneList
|
|||
|
||||
/** returns all available cards of the current list */
|
||||
cards() {
|
||||
const list = Lists.findOne(this.selectedListId.get());
|
||||
const list = ReactiveCache.getList(this.selectedListId.get());
|
||||
let ret = [];
|
||||
if (list) {
|
||||
ret = list.cards(this.selectedSwimlaneId.get());
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ function getCardsBetween(idA, idB) {
|
|||
function getListsStrictlyBetween(id1, id2) {
|
||||
return Lists.find({
|
||||
$and: [
|
||||
{ sort: { $gt: Lists.findOne(id1).sort } },
|
||||
{ sort: { $lt: Lists.findOne(id2).sort } },
|
||||
{ sort: { $gt: ReactiveCache.getList(id1).sort } },
|
||||
{ sort: { $lt: ReactiveCache.getList(id2).sort } },
|
||||
],
|
||||
archived: false,
|
||||
}).map(pluckId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue