| Index: lib/subscriptionInit.js |
| =================================================================== |
| --- a/lib/subscriptionInit.js |
| +++ b/lib/subscriptionInit.js |
| @@ -241,7 +241,7 @@ |
| if (!Prefs.suppress_first_run_page) |
| { |
| let page = null; |
| - if (firstRun) |
| + if (firstRun || exports.dataCorrupted) |
|
kzar
2018/04/24 11:18:01
Well surely this would mean that the first run pag
Sebastian Noack
2018/04/24 11:26:26
Yes, that is the idea, to add this message to the
kzar
2018/04/24 13:34:00
Fair enough, I guess we need to also update the ad
|
| { |
| page = "firstRun.html"; |
| } |
| @@ -266,10 +266,12 @@ |
| initNotifications(); |
| } |
| -Promise.all([FilterNotifier.once("load"), |
| - Prefs.untilLoaded]).then(detectFirstRun) |
| - .then(getSubscriptions) |
| - .then(finishInitialization); |
| +Promise.all([ |
| + FilterNotifier.once("load"), |
| + Prefs.untilLoaded.catch(() => { exports.dataCorrupted = true; }) |
| +]).then(detectFirstRun) |
| + .then(getSubscriptions) |
| + .then(finishInitialization); |
| /** |
| * Indicates whether the default filter subscriptions have been added |
| @@ -281,6 +283,13 @@ |
| exports.reinitialized = false; |
| /** |
| + * Indicates whether a data corruption was detcted. |
| + * |
| + * @type {boolean} |
| + */ |
| +exports.dataCorrupted = false; |
| + |
| +/** |
| * Sets a callback that is called with an array of subscriptions to be added |
| * during initialization. The callback must return an array of subscriptions |
| * that will effectively be added. |