Index: lib/prefs.js |
=================================================================== |
--- a/lib/prefs.js |
+++ b/lib/prefs.js |
@@ -96,16 +96,17 @@ |
values[key] = data[key]; |
} |
catch (e) |
{ |
Cu.reportError(e); |
} |
} |
+ Prefs.initialized = true; |
if (typeof Prefs._initListener == "function") |
Prefs._initListener(); |
}); |
} |
function save() |
{ |
if (isSaving) |
@@ -120,16 +121,18 @@ |
{ |
isSaving = false; |
if (isDirty) |
save(); |
}); |
} |
let Prefs = exports.Prefs = { |
+ initialized: false, |
+ |
addListener: function(listener) |
{ |
if (listeners.indexOf(listener) < 0) |
listeners.push(listener); |
}, |
removeListener: function(listener) |
{ |