Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mobile][photos] sort ente trash by delete by time

Priyanshu Dangare00ee1fb29c2a
diff --git a/mobile/apps/photos/lib/db/trash_db.dart b/mobile/apps/photos/lib/db/trash_db.dart
index 556583dbaf..78cbe53563 100644
--- a/mobile/apps/photos/lib/db/trash_db.dart
+++ b/mobile/apps/photos/lib/db/trash_db.dart
@@ -169,12 +169,11 @@ class TrashDB {
bool? asc,
}) async {
final db = await instance.database;
- final order = (asc ?? false ? 'ASC' : 'DESC');
final results = await db.query(
tableName,
where: '$columnCreationTime >= ? AND $columnCreationTime <= ?',
whereArgs: [startTime, endTime],
- orderBy: '$columnCreationTime ' + order,
+ orderBy: '$columnTrashDeleteBy DESC',
limit: limit,
);
final files = results
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
index f0d6f4e786..bedef56021 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
@@ -89,14 +89,18 @@ class GalleryAppBarWidget extends StatefulWidget {
files: files,
bottom: bottom,
),
- geometryBuilder: (context) =>
- _resolveSliverGeometry(context, subtitle: subtitle),
+ geometryBuilder: (context) => _resolveSliverGeometry(
+ context,
+ subtitle: subtitle,
+ description: collection?.displayDescription,
+ ),
);
}
static HeaderAppBarGeometry _resolveSliverGeometry(
BuildContext context, {
String? subtitle,
+ String? description,
}) {
final inheritedSearchFilterData = InheritedSearchFilterData.maybeOf(
context,
@@ -106,6 +110,10 @@ class GalleryAppBarWidget extends StatefulWidget {
final bottomHeight = isHierarchicalSearchable
? AppBarFilterChips.preferredHeight(context)
: 0.0;
+ final collapsibleBottomHeight = AlbumDescriptionHeader.preferredHeight(
+ context,
+ description,
+ );
return SliverAppBarComponent.resolveGeometry(
context,
subtitle: subtitle,