Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This does a couple things:
Goes back to the old method of returning events for a given day in
EventController.swift
. I believe the original method of the first elements in the array being the events with astartTime
after midnight is the least confusing. We already include events with astartTime
after midnight at the end of the array for the previous day. The current code that includes events with anendTime
leads to confusion such as "the first event in the list on Monday is yesterdays New York Pizza Service". From the perspective of the user most clients already operate with "Late Day Flip" meaning that late events after midnight will be included on that day. If a user opens the events screen between midnight and 3AM they are going to get the previous day schedule (aka the late one that they are now in). Opening at or after 4AM will return the current day (which has yet to happen because its 4AM why are you up) which odds are you don't care about anything that happened last night because it's already happened.Fixes a Daylight Savings related bug with
getDateInCruiseWeek
. Tricordarr was seeing event notifications be generated 1h10m before events rather than 10m before but only on certain days. This is because the previous code did not address the translation correctly from "now" to "then" while also accounting for DST.To support developing 2) above, we now have tests that work! Mostly stripping out old code that didn't work. But now
swift test
does something (well, if you also have the containers and migrations done). Haven't written docs for this yet.Fixes a Tricordarr client config example issue