mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-28 09:59:50 -04:00
FIX: properly migrate old settings
This commit is contained in:
parent
632ee22189
commit
e4044838c5
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user