(options)
| 207 | } |
| 208 | |
| 209 | function syncAutoDarkModeFromStorage(options) { |
| 210 | options = options || {}; |
| 211 | let enabled = syncAutoDarkMode(options); |
| 212 | |
| 213 | readChromeStorageSettings(settings => { |
| 214 | if (!settings) { |
| 215 | return; |
| 216 | } |
| 217 | |
| 218 | syncAutoDarkMode(Object.assign({}, options, { |
| 219 | settings, |
| 220 | force: options.force || enabled !== getAutoDarkModeState(settings) |
| 221 | })); |
| 222 | }); |
| 223 | |
| 224 | return enabled; |
| 225 | } |
| 226 | |
| 227 | function ensureAutoDarkModeWatcher(options) { |
| 228 | if (mediaQueryHandler) { |
no test coverage detected