dynamicbible/src/src/app/services/app-state-initial-state.ts
Jason Wall ff33cdaf34 fix issues with initial state being stored then retrieved overwriting state from previous session.
fix issue with getState() not returning the initial state.
fix issue with excluded search terms not being ignored.
2020-11-25 10:47:33 -05:00

53 lines
1.3 KiB
TypeScript

import { AppState } from '../models/app-state';
import { Overlap } from '../common/bible-reference';
import { StorableType } from '../common/storable';
export const initialState: AppState = {
user: null,
currentCards: {
type: StorableType.initial,
createdOn: new Date(0).toISOString(),
value: [],
},
cardCache: {},
autocomplete: [],
currentSavedPage: null,
savedPages: null,
notes: {
type: StorableType.initial,
createdOn: new Date(0).toISOString(),
value: [],
},
savedPagesLoaded: false,
error: null,
settings: {
type: StorableType.initial,
createdOn: new Date(0).toISOString(),
value: {
displaySettings: {
showStrongsAsModal: false,
appendCardToBottom: true,
insertCardNextToItem: true,
clearSearchAfterQuery: true,
cardFontSize: 12,
cardFontFamily: 'PT Serif',
showVersesOnNewLine: false,
showVerseNumbers: false,
showParagraphs: true,
showParagraphHeadings: true,
syncCardsAcrossDevices: false,
},
pageSettings: {
mergeStrategy: Overlap.Equal,
},
cardIcons: {
words: 'font_download',
passage: 'menu_book',
strongs: 'speaker_notes',
note: 'note',
savedPage: 'inbox',
},
},
},
};