[READ-ONLY] Mirror of https://github.com/probablykasper/remind-me-again. Toggleable cron reminders app for Mac, Linux and Windows
linux macos notifications reminder tauri windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Remove unnecessary next_date field

Kasper (Jul 12, 2022, 2:40 AM +0200) 1be4c19f 0c4cd3ad

-9
-1
src-tauri/src/notifications.rs
··· 34 34 #[serde(skip)] 35 35 pub job_id: Option<JobId>, 36 36 pub cron: String, 37 - pub next_date: Option<u64>, 38 37 } 39 38 impl Group { 40 39 pub fn create_job(&mut self, cron: cron::Schedule, scheduler: &mut Scheduler<Local>, a: String) {
-3
src/lib/Edit.svelte
··· 45 45 cronInput.setSelectionRange(segmentIndex, segmentIndex + segmentText.length) 46 46 } 47 47 } 48 - 49 - let nextDate = group.next_date === null ? null : new Date(group.next_date) 50 - $: group.next_date = nextDate === null ? null : nextDate.getTime() 51 48 </script> 52 49 53 50 <div in:slide={{ duration: 200 }} out:slide={{ duration: 300 }}>
-3
src/lib/Item.svelte
··· 32 32 async function cancel() { 33 33 editGroup = JSON.parse(JSON.stringify(group)) 34 34 isEditing = false 35 - if (group.next_date !== null) { 36 - group.next_date = new Date(group.next_date).getTime() 37 - } 38 35 await tick() 39 36 card.focus() 40 37 }
-1
src/lib/New.svelte
··· 35 35 enabled: true, 36 36 title: '', 37 37 description: '', 38 - next_date: Date.now(), 39 38 cron: '0 0 12,13 */2 * *', 40 39 } 41 40 }
-1
src/lib/types.ts
··· 4 4 enabled: boolean 5 5 id: string 6 6 cron: string 7 - next_date: number | null 8 7 }