Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/prefs.js

Issue 11175032: Actually saving and loading the prefs (Closed)
Patch Set: Created July 22, 2013, 12:43 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/api.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/prefs.js
===================================================================
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -74,7 +74,6 @@
{
let data = JSON.parse(result.content);
for (let key in data)
- if (key in defaults)
values[key] = data[key];
}
catch (e)
@@ -95,7 +94,6 @@
isDirty = true;
return;
}
-
isDirty = false;
isSaving = true;
_fileSystem.write(path, JSON.stringify(values), function()
@@ -119,6 +117,8 @@
if (index >= 0)
listeners.splice(index, 1);
},
+ save: save,
+ values: values,
};
for (let key in defaults)
« no previous file with comments | « lib/api.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld