From 78a349fb0fc922d46a933724e2b5f1129f7aec96 Mon Sep 17 00:00:00 2001 From: Jason Wall Date: Thu, 26 Nov 2020 11:06:47 -0500 Subject: [PATCH] oops... you mostly don't use the `note:` syntax, so you need to pass the type for notes so you know what it is. --- src/README.md | 3 +++ src/src/app/services/app.service.ts | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/README.md b/src/README.md index 1fc3879a..3903aec5 100644 --- a/src/README.md +++ b/src/README.md @@ -19,3 +19,6 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github. - Android and IOS mobile apps with Ionic Capactor - setup CI/CD - strongs numbers with more than one number should appear in tabs or you need to update your text to assign only one number per word(s) +- strongs references need a scrolling box to prevent massive cards +- fix the toString error +- fix headings/formatting of notes diff --git a/src/src/app/services/app.service.ts b/src/src/app/services/app.service.ts index 0b9eaf09..a88568ab 100644 --- a/src/src/app/services/app.service.ts +++ b/src/src/app/services/app.service.ts @@ -157,7 +157,7 @@ export class AppService extends createStateService(reducer, initialState) { async updateCards(queries: IStorable) { const cards: CardItem[] = []; for (const q of queries.value) { - const card = await this.getCardByQuery(q.qry); + const card = await this.getCardByQuery(q.qry, q.type); cards.push(card); } this.dispatch( @@ -169,8 +169,8 @@ export class AppService extends createStateService(reducer, initialState) { ); } - private async getCardByQuery(qry: string): Promise { - if (qry.startsWith('note:')) { + private async getCardByQuery(qry: string, type?: CardType): Promise { + if (qry.startsWith('note:') || (type !== undefined && type === CardType.Note)) { const id = qry.replace('note:', ''); const data = this.getState().notes.value.find((o) => o.id === id); if (!data) { @@ -223,7 +223,7 @@ export class AppService extends createStateService(reducer, initialState) { const cards = []; for (const ref of page.queries) { - cards.push(await this.getCardByQuery(ref.qry)); + cards.push(await this.getCardByQuery(ref.qry, ref.type)); } this.dispatch(AppActionFactory.newUpdateCards(new Storable(cards)));