diff --git a/DynamicBibleIonic/src/app/main.ts b/DynamicBibleIonic/src/app/main.ts index 6af7a5b2..439a30f6 100644 --- a/DynamicBibleIonic/src/app/main.ts +++ b/DynamicBibleIonic/src/app/main.ts @@ -1,5 +1,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app.module'; +import {enableProdMode} from '@angular/core'; +enableProdMode(); platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/DynamicBibleIonic/src/pages/search/search.ts b/DynamicBibleIonic/src/pages/search/search.ts index acd2a039..a26a4a89 100644 --- a/DynamicBibleIonic/src/pages/search/search.ts +++ b/DynamicBibleIonic/src/pages/search/search.ts @@ -128,8 +128,32 @@ export class SearchPage implements OnInit u.user.items[i] = { qry: ci["data"].word, dict: ci.dict, type: ci.type }; else if (ci["data"].sn !== undefined) u.user.items[i] = { qry: ci["data"].sn, dict: ci["prefix"] === 'G' ? 'grk' : 'heb', type: ci.type }; + + has_migrated = true; } } + + for (let pg of u.user.saved_pages) + { + for (let i in pg.queries) + { + let ci = pg.queries[i]; + if (ci["data"] !== undefined) + { + if (ci["data"].qry !== undefined) + pg.queries[i] = { qry: ci["data"].qry, dict: ci.dict, type: ci.type }; + else if (ci["data"].ref !== undefined) + pg.queries[i] = { qry: ci["data"].ref, dict: ci.dict, type: ci.type }; + else if (ci["data"].word !== undefined) + pg.queries[i] = { qry: ci["data"].word, dict: ci.dict, type: ci.type }; + else if (ci["data"].sn !== undefined) + pg.queries[i] = { qry: ci["data"].sn, dict: ci["prefix"] === 'G' ? 'grk' : 'heb', type: ci.type }; + + has_migrated = true; + } + } + } + if (has_migrated) this.userProfile.save(this.local); }