fix display of strongs results

This commit is contained in:
Jason Wall 2020-07-27 09:49:21 -04:00
parent a033801f29
commit 078aa1eddd
2 changed files with 7 additions and 4 deletions

View File

@ -12,6 +12,7 @@ import { Paragraph } from '../../../models/app-state';
})
export class PassageComponent extends CardComponent implements OnInit {
ref: BibleReference;
showParagraphs$ = this.appService.select(
(state) => state.displaySettings.showParagraphs
);
@ -149,8 +150,10 @@ export class PassageComponent extends CardComponent implements OnInit {
openStrongs(q: string) {
const dict = this.cardItem.dict === 'H' ? 'heb' : 'grk';
const strongsNumber = q.substring(1, q.length);
this.appService.getNewStrongs(strongsNumber, dict, this.cardItem);
const numbers = q.split(' ');
for (const sn of numbers) {
this.appService.getNewStrongs(sn, dict, this.cardItem);
}
}
isPunct(c: string) {

View File

@ -105,11 +105,11 @@ function reducer(state: AppState, action: AppAction): AppState {
if (state.displaySettings.appendCardToBottom) {
const before = state.cards.slice(0, idx + 1);
const after = state.cards.slice(idx + 1);
cards = [before, action.card, after];
cards = [...before, action.card, ...after];
} else {
const before = state.cards.slice(0, idx);
const after = state.cards.slice(idx);
cards = [before, action.card, after];
cards = [...before, action.card, ...after];
}
} else {
if (state.displaySettings.appendCardToBottom) {