Conditions | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { getGlobalStorageProvider } from "../browserApi/storageProvider"; |
||
22 | getProperty(key, callback) { |
||
23 | if (this.settingsCache.has(key)) { |
||
24 | callback(this.settingsCache.get(key)); |
||
25 | } |
||
26 | else { |
||
27 | // OOOPS // currently all settings are default true. This isn´t a problem but there should be much better soloutions after migration to typescript.... |
||
28 | getGlobalStorageProvider().getData(key, true, value => { |
||
29 | this.settingsCache.set(key, value); |
||
30 | callback(value); |
||
31 | }); |
||
32 | } |
||
33 | } |
||
34 | } |
||
44 | } |