(prefs)
| 12 | export const defaultsInitialized = new Promise(resolve => defaultsInitDone = resolve); |
| 13 | |
| 14 | function initSecurityBgnd(prefs) { |
| 15 | if (prefs.security.bgIcon && prefs.security.bgColor) { |
| 16 | return; |
| 17 | } |
| 18 | const securityBGArr = Object.entries(common.securityBGs); |
| 19 | prefs.security.bgIcon = securityBGArr[getSecureRandom(0, securityBGArr.length - 1)][0]; |
| 20 | const securityColorArr = Object.keys(common.securityColors); |
| 21 | prefs.security.bgColor = securityColorArr[getSecureRandom(0, securityColorArr.length - 1)]; |
| 22 | prefs.security.personalized = false; |
| 23 | } |
| 24 | |
| 25 | export async function init() { |
| 26 | let prefs = await getPreferences(); |
no test coverage detected