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

Unified Diff: lib/filterListener.js

Issue 5450822905233408: Issue 417 - Reinitializing removed filter lists (Core/Firefox) (Closed)
Patch Set: Created May 26, 2014, 10:22 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
Index: lib/filterListener.js
===================================================================
--- a/lib/filterListener.js
+++ b/lib/filterListener.js
@@ -120,7 +120,22 @@
ElemHide.init();
else
flushElemHide = function() {}; // No global stylesheet in Chrome & Co.
- FilterStorage.loadFromDisk();
+ FilterStorage.loadFromDisk(null, function()
+ {
+ // All attempts to restore filter settings have failed
+ // so we need to reinitialize them
+ if (addSubscription)
+ {
+ addSubscription(null);
+ filterlistsReinitialized = true;
+ }
+ else
+ {
+ let {UI} = require("ui");
+ UI.addSubscription(UI.currentWindow, null);
+ UI.filterlistsReinitialized = true;
+ }
+ });
Wladimir Palant 2014/05/26 15:08:46 This is really the wrong place to do it. We are al
Thomas Greiner 2014/05/26 17:45:38 Done.
TimeLine.log("done initializing data structures");

Powered by Google App Engine
This is Rietveld