Notifications!
Plus minor bug fixes (like saving not working after first shot). This needs to address the favicon issue still, but notifications are largely working.
This commit is contained in:
parent
5895e0f052
commit
51ab5aae2a
5 changed files with 98 additions and 48 deletions
14
js/main.js
14
js/main.js
|
@ -76,11 +76,9 @@ async function webapp_init() {
|
|||
init_message_textareas();
|
||||
view_show_spinner(true);
|
||||
redraw_my_pfp(model);
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
update_title(model);
|
||||
});
|
||||
|
||||
// Load our contacts first
|
||||
// Load data from storage
|
||||
await model_load_settings(model);
|
||||
let err;
|
||||
err = await contacts_load(model);
|
||||
if (err) {
|
||||
|
@ -131,9 +129,11 @@ function on_timer_invalidations() {
|
|||
|
||||
function on_timer_save() {
|
||||
setTimeout(() => {
|
||||
model_save_events(DAMUS);
|
||||
contacts_save(DAMUS.contacts);
|
||||
on_timer_invalidations();
|
||||
const model = DAMUS;
|
||||
model_save_events(model);
|
||||
model_save_settings(model);
|
||||
contacts_save(model.contacts);
|
||||
on_timer_save();
|
||||
}, 10 * 1000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue