Skip to content

armgit / ente

Public Imported from GitHub
0

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

add on tap to 'view all' in section header

ashilkn7b8967c5270b
diff --git a/lib/ui/viewer/search_tab/section_header.dart b/lib/ui/viewer/search_tab/section_header.dart
index f6466f0920..bd97c7215f 100644
--- a/lib/ui/viewer/search_tab/section_header.dart
+++ b/lib/ui/viewer/search_tab/section_header.dart
@@ -1,6 +1,8 @@
import "package:flutter/material.dart";
import "package:photos/models/search/search_types.dart";
import "package:photos/theme/ente_theme.dart";
+import "package:photos/ui/viewer/search/result/search_section_all_page.dart";
+import "package:photos/utils/navigation_util.dart";
class SectionHeader extends StatelessWidget {
final SectionType sectionType;
@@ -9,26 +11,41 @@ class SectionHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Padding(
- padding: const EdgeInsets.all(12),
- child: Text(
- sectionType.sectionTitle(context),
- style: getEnteTextTheme(context).largeBold,
+ return GestureDetector(
+ onTap: () {
+ if (hasMore) {
+ routeToPage(
+ context,
+ SearchSectionAllPage(
+ sectionType: sectionType,
+ ),
+ );
+ }
+ },
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(12),
+ child: Text(
+ sectionType.sectionTitle(context),
+ style: getEnteTextTheme(context).largeBold,
+ ),
),
- ),
- hasMore
- ? Padding(
- padding: const EdgeInsets.all(12),
- child: Icon(
- Icons.chevron_right_outlined,
- color: getEnteColorScheme(context).strokeMuted,
- ),
- )
- : const SizedBox.shrink(),
- ],
+ hasMore
+ ? Container(
+ color: Colors.transparent,
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(24, 12, 12, 12),
+ child: Icon(
+ Icons.chevron_right_outlined,
+ color: getEnteColorScheme(context).strokeMuted,
+ ),
+ ),
+ )
+ : const SizedBox.shrink(),
+ ],
+ ),
);
}
}