Commit cc92de41 authored by Jim Nelson's avatar Jim Nelson

#3453: Undated event producing "(null)" in the date range UI field.

parent 6cd22f39
......@@ -67,7 +67,7 @@ class EventDirectoryItem : CheckerboardItem {
private static string get_formatted_title(Event event) {
bool has_photos = MediaSourceCollection.has_photo(event.get_media());
bool has_videos = MediaSourceCollection.has_video(event.get_media());
int count = event.get_media_count();
string count_text = "";
if (has_photos && has_videos)
......@@ -77,9 +77,11 @@ class EventDirectoryItem : CheckerboardItem {
else
count_text = ngettext("%d Photo", "%d Photos", count).printf(count);
if (event.has_name())
string? daterange = event.get_formatted_daterange();
if (daterange != null)
return "<b>%s</b>\n%s\n%s".printf(guarded_markup_escape_text(event.get_name()),
guarded_markup_escape_text(count_text), event.get_formatted_daterange());
guarded_markup_escape_text(count_text), guarded_markup_escape_text(daterange));
else
return "<b>%s</b>\n%s".printf(guarded_markup_escape_text(event.get_name()),
guarded_markup_escape_text(count_text));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment