mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 07:19:50 -04:00
oops... you mostly don't use the note:
syntax, so you need to pass the type for notes so you know what it is.
This commit is contained in:
parent
62a82142fa
commit
78a349fb0f
@ -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
|
||||
|
@ -157,7 +157,7 @@ export class AppService extends createStateService(reducer, initialState) {
|
||||
async updateCards(queries: IStorable<readonly DataReference[]>) {
|
||||
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<CardItem> {
|
||||
if (qry.startsWith('note:')) {
|
||||
private async getCardByQuery(qry: string, type?: CardType): Promise<CardItem> {
|
||||
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)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user