|
@@ -6,7 +6,7 @@
|
|
* @author TSI-mc
|
|
* @author TSI-mc
|
|
* Copyright (C) 2022 Tobias Kaminsky
|
|
* Copyright (C) 2022 Tobias Kaminsky
|
|
* Copyright (C) 2022 Nextcloud GmbH
|
|
* Copyright (C) 2022 Nextcloud GmbH
|
|
- * Copyright (C) 2022 TSI-mc
|
|
|
|
|
|
+ * Copyright (C) 2023 TSI-mc
|
|
*
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
@@ -195,14 +195,14 @@ class GalleryAdapter(
|
|
|
|
|
|
if (finalSortedList.isEmpty()) {
|
|
if (finalSortedList.isEmpty()) {
|
|
photoFragment.setEmptyListMessage(SearchType.GALLERY_SEARCH)
|
|
photoFragment.setEmptyListMessage(SearchType.GALLERY_SEARCH)
|
|
- } else {
|
|
|
|
- files = finalSortedList
|
|
|
|
- .groupBy { firstOfMonth(it.modificationTimestamp) }
|
|
|
|
- .map { GalleryItems(it.key, transformToRows(it.value)) }
|
|
|
|
- .sortedBy { it.date }.reversed()
|
|
|
|
-
|
|
|
|
- Handler(Looper.getMainLooper()).post { notifyDataSetChanged() }
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ files = finalSortedList
|
|
|
|
+ .groupBy { firstOfMonth(it.modificationTimestamp) }
|
|
|
|
+ .map { GalleryItems(it.key, transformToRows(it.value)) }
|
|
|
|
+ .sortedBy { it.date }.reversed()
|
|
|
|
+
|
|
|
|
+ Handler(Looper.getMainLooper()).post { notifyDataSetChanged() }
|
|
}
|
|
}
|
|
|
|
|
|
private fun transformToRows(list: List<OCFile>): List<GalleryRow> {
|
|
private fun transformToRows(list: List<OCFile>): List<GalleryRow> {
|