Update web/viewer.js

Use asyncStorage.setItem for B2G
This commit is contained in:
Marco 2013-02-10 23:06:47 +01:00 committed by Marco Castelluccio
parent 4317bc2586
commit 3058c40432

View File

@ -218,11 +218,18 @@ var Settings = (function SettingsClosure() {
var file = this.file;
file[name] = val;
var database = JSON.stringify(this.database);
//#if !(FIREFOX || MOZCENTRAL)
//#if B2G
// asyncStorage.setItem('database', database);
//#endif
//#if FIREFOX || MOZCENTRAL
// FirefoxCom.requestSync('setDatabase', database);
//#endif
//#if !(FIREFOX || MOZCENTRAL || B2G)
if (isLocalStorageEnabled)
localStorage.setItem('database', database);
//#else
// FirefoxCom.requestSync('setDatabase', database);
//#endif
},