π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Keep jump to date behind internal feature flag
ashilknbfb8c76112ba
diff --git a/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart b/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dartindex ec53b54509..e2bb1b3a06 100644--- a/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart+++ b/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart@@ -329,12 +329,12 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {valueListenable: inheritedData.indexNotifier,child: GestureDetector(onTap: () => Navigator.pop(context),- child: const Padding(- padding: EdgeInsets.fromLTRB(4, 8, 8, 8),+ child: Padding(+ padding: const EdgeInsets.fromLTRB(4, 8, 8, 8),child: Icon(Icons.close,color: Colors.white,- size: 20,+ size: flagService.internalUser ? 20 : null,),),),@@ -368,59 +368,79 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {Row(children: [child!,- GestureDetector(- onTap: () async {- final fullScreenState =- context.findAncestorStateOfType<- _FullScreenMemoryState>();- fullScreenState?._toggleAnimation(pause: true);- await routeToPage(- context,- JumpToDateGallery(- fileToJumpTo:- inheritedData.memories[value].file,- ),- );- fullScreenState?._toggleAnimation(pause: false);- },- child: Container(- decoration: BoxDecoration(- borderRadius: BorderRadius.circular(4),- // color: fillFaintDark,- color: blurStrokeFaintDark,- border: Border.all(- color: strokeFaintDark,- width: 1,+ if (flagService.internalUser)+ GestureDetector(+ onTap: () async {+ final fullScreenState =+ context.findAncestorStateOfType<+ _FullScreenMemoryState>();+ fullScreenState?._toggleAnimation(+ pause: true,+ );+ await routeToPage(+ context,+ JumpToDateGallery(+ fileToJumpTo:+ inheritedData.memories[value].file,+ ),+ );+ fullScreenState?._toggleAnimation(+ pause: false,+ );+ },+ child: Container(+ decoration: BoxDecoration(+ borderRadius: BorderRadius.circular(4),+ // color: fillFaintDark,+ color: blurStrokeFaintDark,+ border: Border.all(+ color: strokeFaintDark,+ width: 1,+ ),),- ),- child: Row(- children: [- const SizedBox(width: 2),- Padding(- padding: const EdgeInsets.all(2.0),- child: Text(- SmartMemoriesService.getDateFormatted(- creationTime: inheritedData- .memories[value]- .file- .creationTime!,- context: context,+ child: Row(+ children: [+ const SizedBox(width: 2),+ Padding(+ padding: const EdgeInsets.all(2.0),+ child: Text(+ SmartMemoriesService.getDateFormatted(+ creationTime: inheritedData+ .memories[value]+ .file+ .creationTime!,+ context: context,+ ),+ style: getEnteTextTheme(context)+ .miniMuted+ .copyWith(color: textBaseDark),),- style: getEnteTextTheme(context)- .miniMuted- .copyWith(color: textBaseDark),),- ),- const SizedBox(width: 4),- const Icon(- Icons.keyboard_arrow_right_outlined,- size: 14,- color: blurStrokeBaseDark,- ),- ],+ const SizedBox(width: 4),+ const Icon(+ Icons.keyboard_arrow_right_outlined,+ size: 14,+ color: blurStrokeBaseDark,+ ),+ ],+ ),+ ),+ )+ else+ Text(+ SmartMemoriesService.getDateFormatted(+ creationTime: inheritedData+ .memories[value].file.creationTime!,+ context: context,),+ style: Theme.of(context)+ .textTheme+ .titleMedium!+ .copyWith(+ fontSize: 14,+ color: Colors.white,+ ),),- ),],),],diff --git a/mobile/apps/photos/lib/ui/viewer/file_details/creation_time_item_widget.dart b/mobile/apps/photos/lib/ui/viewer/file_details/creation_time_item_widget.dartindex afde22db7d..031cc5f2a4 100644--- a/mobile/apps/photos/lib/ui/viewer/file_details/creation_time_item_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/file_details/creation_time_item_widget.dart@@ -1,6 +1,7 @@import "package:flutter/material.dart";import "package:intl/intl.dart";import 'package:photos/models/file/file.dart';+import "package:photos/service_locator.dart";import "package:photos/theme/ente_theme.dart";import "package:photos/ui/components/info_item_widget.dart";import "package:photos/ui/viewer/date/edit_date_sheet.dart";@@ -24,31 +25,37 @@ class _CreationTimeItemState extends State<CreationTimeItem> {widget.file.creationTime!,isUtc: true,).toLocal();- return GestureDetector(- behavior: HitTestBehavior.translucent,- onTap: () {- routeToPage(context, JumpToDateGallery(fileToJumpTo: widget.file));- },- child: InfoItemWidget(- key: const ValueKey("Creation time"),- leadingIcon: Icons.calendar_today_outlined,- title: DateFormat.yMMMEd(Localizations.localeOf(context).languageCode)- .format(dateTime),- subtitleSection: Future.value([- Text(- getTimeIn12hrFormat(dateTime) + " " + dateTime.timeZoneName,- style: getEnteTextTheme(context).miniMuted,- ),- ]),- editOnTap: ((widget.file.ownerID == null ||- widget.file.ownerID == widget.currentUserID) &&- widget.file.uploadedFileID != null)- ? () {- _showDateTimePicker(widget.file);- }- : null,- ),+ final infoWidget = InfoItemWidget(+ key: const ValueKey("Creation time"),+ leadingIcon: Icons.calendar_today_outlined,+ title: DateFormat.yMMMEd(Localizations.localeOf(context).languageCode)+ .format(dateTime),+ subtitleSection: Future.value([+ Text(+ getTimeIn12hrFormat(dateTime) + " " + dateTime.timeZoneName,+ style: getEnteTextTheme(context).miniMuted,+ ),+ ]),+ editOnTap: ((widget.file.ownerID == null ||+ widget.file.ownerID == widget.currentUserID) &&+ widget.file.uploadedFileID != null)+ ? () {+ _showDateTimePicker(widget.file);+ }+ : null,);++ if (flagService.internalUser) {+ return GestureDetector(+ behavior: HitTestBehavior.translucent,+ onTap: () {+ routeToPage(context, JumpToDateGallery(fileToJumpTo: widget.file));+ },+ child: infoWidget,+ );+ }++ return infoWidget;}void _showDateTimePicker(EnteFile file) async {