diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit f099a1bad04860609876fcb823beefcfd9a88772
parent 03ea9929db053b33d34508d6a958cd5ec2ead9d2
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Sun, 26 Mar 2023 22:58:35 +0200

fix(caldav): move curs before syncing

Diffstat:
Msrc/diary.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/diary.c b/src/diary.c @@ -851,6 +851,9 @@ int main(int argc, char** argv) { // reset confirmation char from previous sync attempts conf_ch = 0; for( ; new_datetime <= end_of_month; new_datetime = mktime(&new_date)) { + // this udpates curs_date (todo: document this better) + go_to(cal, aside, mktime(&new_date), &pad_pos, &curs_date, &cal_start, &cal_end); + update_date(header, &curs_date); if (conf_ch == -1) { // sync error break; @@ -864,9 +867,6 @@ int main(int argc, char** argv) { // show confirmation dialogue before overwriting local files conf_ch = caldav_sync(&new_date, header, cal, pad_pos, CONFIG.dir, diary_dir_size, true); } - // this udpates curs_date (todo: document this better) - go_to(cal, aside, mktime(&new_date), &pad_pos, &curs_date, &cal_start, &cal_end); - update_date(header, &curs_date); display_entry(CONFIG.dir, diary_dir_size, &curs_date, prev, prev_width); new_date.tm_mday++; }