leits / MeetingBar

🇺🇦 Your meetings at your fingertips in the macOS menu bar
https://meetingbar.app
Apache License 2.0
4.54k stars 203 forks source link

Feature: allow more options on "show events for" #718

Open CampAsAChamp opened 6 months ago

CampAsAChamp commented 6 months ago

Issue that this suggestion fixes

Currently there are only two options for the setting "Show events for" in Preferences > Appearance

I would like to have some other options available which would allow MeetingBar to show events for more days

Solution description

Add additional options to the drop down which would allow MeetingBar to show events for more days

Alternatives considered

Fully customizable number picker, but would probably require a much bigger refactor.

Additional context

I can potentially work on this myself. Never worked in Swift before but after peaking around in the code a bit I see theres a constant for today_n_tomorrow and then theres some switch statements which use that constant and will either fetch the events for 1 day if its set to today or 2 days if set for today_n_tomorrow.

endPeriod = Calendar.current.date(byAdding: .day, value: 2, to: todayMidnight)!
dateTo = Calendar.current.date(byAdding: .day, value: 2, to: dateFrom)!

Hopefully I can just add another constant for five_days and set the value to 5 (same for the other options of 7 days or 14 days)

endPeriod = Calendar.current.date(byAdding: .day, value: 5, to: todayMidnight)!
dateTo = Calendar.current.date(byAdding: .day, value: 5, to: dateFrom)!
CampAsAChamp commented 6 months ago

Is there a way I can build locally without needing an Apple Development Team ID?

If so I'd love to work on this, but looking at CONTRIBUTING.md it looks like I'll need that.