mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Simplify UserBackground code
This commit is contained in:
parent
e13337e247
commit
18cedbabad
4 changed files with 14 additions and 32 deletions
|
|
@ -38,7 +38,6 @@ import {
|
|||
} from 'Common/Cache';
|
||||
|
||||
import {
|
||||
userBackground,
|
||||
mailBox,
|
||||
root,
|
||||
openPgpWorkerJs,
|
||||
|
|
@ -112,16 +111,6 @@ class AppUser extends AbstractApp {
|
|||
lastTime = currentTime;
|
||||
}, interval);
|
||||
|
||||
if (SettingsGet('UserBackgroundHash')) {
|
||||
setTimeout(() => {
|
||||
const img = userBackground(SettingsGet('UserBackgroundHash'));
|
||||
if (img) {
|
||||
$htmlCL.add('UserBackground');
|
||||
doc.body.style.backgroundImage = "url("+img+")";
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
const fn = (ev=>$htmlCL.toggle('rl-ctrl-key-pressed', ev.ctrlKey)).debounce(500);
|
||||
['keydown','keyup'].forEach(t => doc.addEventListener(t, fn));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue