pakerwreah / Calendr

Menu bar calendar for macOS
MIT License
1.15k stars 53 forks source link

Calendar is slow to open when opening from menu bar icon #257

Closed laurentNoudohounsi closed 1 month ago

laurentNoudohounsi commented 1 month ago

Hi @pakerwreah

Thanks for the great app. I was looking for an alternative to Itsycal that displayed calendar event AND reminders with a nice UI. It's really great to use your app but I noticed a slight delay between the moment I click on the menu bar icon and the displaying of the calendar. On the other side, opening a calendar with Itsycal is immediately

Is it something known ? I guess some time consuming code may running when we open the calendar. Are we loading all the event and reminder when we click on the menu bar icon ?

Maybe I could help on it.

Thanks

laurentNoudohounsi commented 1 month ago

Quick Update: After testing again Istycal and Calendar, it seems that the feeling of immediate opening comes from the fact Itscal show the calendar when the mouse click is down. Calendar trigger the even when the mouse is up.

https://github.com/pakerwreah/Calendr/blob/15bc7bd50aa91cc732289d147a0d481c32fe961c/Calendr/Main/MainViewController.swift#L854-L861

A quick fix to improve the user experience could be to simply replace .leftMouseUp / . rightMouseUp with .leftMouseDown / . rightMouseDown.

What do you think about it @pakerwreah ?

pakerwreah commented 1 month ago

That makes sense.

Feel free to open a PR. It looks pretty simple.

I'm on holidays right now, but I can have a look next week.

laurentNoudohounsi commented 1 month ago

Thanks @pakerwreah . The PR is here: https://github.com/pakerwreah/Calendr/pull/259 ;)