mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Stop adding empty groups to the gallery.
This commit is contained in:
committed by
Stefan Ceriu
parent
40d820d4f4
commit
681daf50ea
+4
-2
@@ -111,8 +111,10 @@ class MediaEventsTimelineScreenViewModel: MediaEventsTimelineScreenViewModelType
|
|||||||
let group = MediaEventsTimelineGroup(id: item.id.uniqueID.id,
|
let group = MediaEventsTimelineGroup(id: item.id.uniqueID.id,
|
||||||
title: titleForDate(item.timestamp),
|
title: titleForDate(item.timestamp),
|
||||||
items: currentItems)
|
items: currentItems)
|
||||||
currentItems = []
|
if !currentItems.isEmpty {
|
||||||
newGroups.append(group)
|
newGroups.append(group)
|
||||||
|
currentItems = []
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
currentItems.append(item)
|
currentItems.append(item)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user