π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
update exif dialog
aman-pilot132b10558ae1
diff --git a/mobile/apps/photos/lib/ui/viewer/file/exif_info_dialog.dart b/mobile/apps/photos/lib/ui/viewer/file/exif_info_dialog.dartindex e504d83955..ec3e6df7be 100644--- a/mobile/apps/photos/lib/ui/viewer/file/exif_info_dialog.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/exif_info_dialog.dart@@ -1,7 +1,7 @@+import "package:ente_components/ente_components.dart";import 'package:flutter/material.dart';import "package:photos/generated/l10n.dart";import 'package:photos/models/file/file.dart';-import "package:photos/theme/ente_theme.dart";import 'package:photos/ui/common/loading_widget.dart';import 'package:photos/utils/exif_util.dart';@@ -11,34 +11,30 @@ class ExifInfoDialog extends StatelessWidget {@overrideWidget build(BuildContext context) {- final textTheme = getEnteTextTheme(context);- return AlertDialog(- title: Column(+ final colors = context.componentColors;+ return BottomSheetComponent(+ title: AppLocalizations.of(context).exif,+ isScrollable: true,+ snap: true,+ initialChildSize: 0.75,+ snapSizes: const [0.5, 0.75, 0.95],+ content: Column(crossAxisAlignment: CrossAxisAlignment.start,+ mainAxisSize: MainAxisSize.min,children: [- Text(AppLocalizations.of(context).exif, style: textTheme.h3Bold),- Text(file.title!, style: textTheme.smallMuted),+ Text(+ file.title!,+ style: TextStyles.body.copyWith(color: colors.textLight),+ ),+ const SizedBox(height: Spacing.lg),+ _getInfo(context),],),- content: Scrollbar(- thumbVisibility: true,- child: SingleChildScrollView(child: _getInfo()),- ),- actions: [- TextButton(- child: Text(- AppLocalizations.of(context).close,- style: textTheme.body,- ),- onPressed: () {- Navigator.of(context).pop('dialog');- },- ),- ],);}- Widget _getInfo() {+ Widget _getInfo(BuildContext context) {+ final colors = context.componentColors;return FutureBuilder(future: getExif(file),builder: (BuildContext context, AsyncSnapshot snapshot) {@@ -48,27 +44,11 @@ class ExifInfoDialog extends StatelessWidget {.map((entry) => "${entry.key}: ${entry.value}").join("\n");if (data.isEmpty) {- data = "no exif data found";+ data = AppLocalizations.of(context).noExifData;}- return Container(- padding: const EdgeInsets.all(2),- color: Colors.white.withValues(alpha: 0.05),- child: Center(- child: Padding(- padding: const EdgeInsets.all(4),- child: Text(- data,- style: TextStyle(- fontSize: 14,- fontFeatures: const [FontFeature.tabularFigures()],- height: 1.4,- color: Theme.of(- context,- ).colorScheme.onSurface.withValues(alpha: 0.7),- ),- ),- ),- ),+ return Text(+ data,+ style: TextStyles.body.copyWith(color: colors.textLight),);} else {return const EnteLoadingWidget();diff --git a/mobile/apps/photos/lib/ui/viewer/file_details/exif_item_widgets.dart b/mobile/apps/photos/lib/ui/viewer/file_details/exif_item_widgets.dartindex 6e2d416be7..701da6d0f2 100644--- a/mobile/apps/photos/lib/ui/viewer/file_details/exif_item_widgets.dart+++ b/mobile/apps/photos/lib/ui/viewer/file_details/exif_item_widgets.dart@@ -4,7 +4,6 @@ import "package:flutter/material.dart";import "package:hugeicons/hugeicons.dart";import "package:photos/generated/l10n.dart";import 'package:photos/models/file/file.dart';-import "package:photos/theme/colors.dart";import "package:photos/ui/notification/toast.dart";import "package:photos/ui/viewer/file/exif_info_dialog.dart";@@ -57,13 +56,9 @@ class AllExifItemWidget extends StatelessWidget {onTap = null;} else if (exif!.isNotEmpty) {subtitle = l10n.viewAllExifData;- onTap = () => showDialog(- useRootNavigator: false,+ onTap = () => showBottomSheetComponent(context: context,- builder: (BuildContext context) {- return ExifInfoDialog(file);- },- barrierColor: backdropFaintDark,+ builder: (context) => ExifInfoDialog(file),);} else {subtitle = l10n.noExifData;