Stop adding empty groups to the gallery.
This commit is contained in:
committed by
Stefan Ceriu
parent
1b684d269e
commit
fbdbc562ca
@@ -111,8 +111,10 @@ class MediaEventsTimelineScreenViewModel: MediaEventsTimelineScreenViewModelType
|
||||
let group = MediaEventsTimelineGroup(id: item.id.uniqueID.id,
|
||||
title: titleForDate(item.timestamp),
|
||||
items: currentItems)
|
||||
currentItems = []
|
||||
newGroups.append(group)
|
||||
if !currentItems.isEmpty {
|
||||
newGroups.append(group)
|
||||
currentItems = []
|
||||
}
|
||||
} else {
|
||||
currentItems.append(item)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user