Skip to content

Commit

Permalink
fix(dav): Hide less than minute diff in calendar notification title
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <jld3103yt@gmail.com>
  • Loading branch information
provokateurin committed Dec 20, 2023
1 parent aae9960 commit 08b4302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/Reminder/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private function prepareNotificationSubject(INotification $notification): void {
$components[] = $this->l10n->n('%n minute', '%n minutes', $diff->i);
}

if (!$this->hasPhpDatetimeDiffBug()) {
if (count($components) > 0 && !$this->hasPhpDatetimeDiffBug()) {
// Limiting to the first three components to prevent
// the string from getting too long
$firstThreeComponents = array_slice($components, 0, 2);
Expand Down

0 comments on commit 08b4302

Please sign in to comment.