The previous commit to remove truncation caused long titles that were not well
handled by some clocks. This commit instead uses truncation based on string
wrapping, which maintains limited-length titles, but now preserves images
(e.g. emojis) embedded in the titles.
Previously, all event titles would be truncated to 12 characters when displayed
in a clock info. This hides some information, and completely breaks event
titles containing embedded images (i.e. converted emojis). This change simply
removes the truncation, allowing the full title and full images to be shown.
All-day events synchronized from Gadgetbridge always start at midnight UTC,
which causes them to display as different days depending on time zone offset
(specifically negative offsets display the date as one day early). This was
previously fixed in the agenda app in pull request #3695 (commit bcf88c3).
This commit replicates that fix in the clockinfo that agenda provides.
Currently, allDay events are off by one day for negative timezones. Per
the CalendarContract:
If allDay is set to 1 eventTimezone must be "UTC" and the time must
correspond to a midnight boundary.
For example, in GMT-2:00, an all day event on December 2nd (beginning at
00:00:00) will be wrongly displayed as starting on December 1st, since
the locale will determine that the event's start time is actually
22:00:00 on Dec 1.
Source:
https://developer.android.com/reference/android/provider/CalendarContract.Events.html
This commit:
* Corrects the offset back to UTC 00:00:00 for allDay events
* Fixes the conditional for single-day all day events in showEvent()
* Fixes the display of formatDateShort() for some English locales by
also removing any trailing commas or whitespace when the year is
removed