Update reminders when importing a calendar

pull/1/head
yflory 4 years ago
parent 9e47383083
commit bd23cf49fc

@ -95,8 +95,6 @@ define([
var ev = Util.clone(_ev); var ev = Util.clone(_ev);
var uid = ev.id; var uid = ev.id;
//ctx.store.data.lastVisit = 1617922639683; // XXX Friday Apr 09, used to test
// Clear reminders for this event // Clear reminders for this event
if (Array.isArray(reminders[uid])) { if (Array.isArray(reminders[uid])) {
reminders[uid].forEach(function (to) { clearTimeout(to); }); reminders[uid].forEach(function (to) { clearTimeout(to); });
@ -124,11 +122,6 @@ define([
return; return;
} }
// XXX
// TODO
// use custom notifications per event
// if you missed a notification, show it instantly (eg: load cryptpad 45min before an event, show the 1h notification)
var send = function () { var send = function () {
var hide = Util.find(ctx, ['store', 'proxy', 'settings', 'general', 'calendar', 'hideNotif']); var hide = Util.find(ctx, ['store', 'proxy', 'settings', 'general', 'calendar', 'hideNotif']);
if (hide) { return; } if (hide) { return; }
@ -524,6 +517,7 @@ define([
c.proxy.content = c.proxy.content || {}; c.proxy.content = c.proxy.content || {};
Object.keys(json).forEach(function (uid) { Object.keys(json).forEach(function (uid) {
c.proxy.content[uid] = json[uid]; c.proxy.content[uid] = json[uid];
addReminders(ctx, id, json[uid]);
}); });
Realtime.whenRealtimeSyncs(c.lm.realtime, function () { Realtime.whenRealtimeSyncs(c.lm.realtime, function () {

Loading…
Cancel
Save