π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Enable drag functionality in pick cover photo, person avatar, and center point widget.
Aman Raj Singh Mouryaf44c2d14c743
diff --git a/mobile/lib/ui/viewer/gallery/hooks/pick_cover_photo.dart b/mobile/lib/ui/viewer/gallery/hooks/pick_cover_photo.dartindex f6b8978306..4a0b116ff7 100644--- a/mobile/lib/ui/viewer/gallery/hooks/pick_cover_photo.dart+++ b/mobile/lib/ui/viewer/gallery/hooks/pick_cover_photo.dart@@ -37,7 +37,7 @@ Future<int?> showPickCoverPhotoSheet(topControl: const SizedBox.shrink(),backgroundColor: getEnteColorScheme(context).backgroundElevated,barrierColor: backdropFaintDark,- enableDrag: false,+ enableDrag: true,);}diff --git a/mobile/lib/ui/viewer/gallery/hooks/pick_person_avatar.dart b/mobile/lib/ui/viewer/gallery/hooks/pick_person_avatar.dartindex 9d7dabbda6..1adecdee72 100644--- a/mobile/lib/ui/viewer/gallery/hooks/pick_person_avatar.dart+++ b/mobile/lib/ui/viewer/gallery/hooks/pick_person_avatar.dart@@ -38,7 +38,7 @@ Future<dynamic> showPersonAvatarPhotoSheet(topControl: const SizedBox.shrink(),backgroundColor: getEnteColorScheme(context).backgroundElevated,barrierColor: backdropFaintDark,- enableDrag: false,+ enableDrag: true,);}@@ -137,57 +137,36 @@ class PickPersonCoverPhotoWidget extends StatelessWidget {),),),- child: Column(- children: [- ValueListenableBuilder(- valueListenable: isFileSelected,- builder: (context, bool value, _) {- return AnimatedSwitcher(- duration: const Duration(milliseconds: 300),- switchInCurve: Curves.easeInOutExpo,- switchOutCurve: Curves.easeInOutExpo,- child: ButtonWidget(- key: ValueKey(value),- isDisabled: !value,- buttonType: ButtonType.neutral,- labelText: S.of(context).useSelectedPhoto,- onTap: () async {- final selectedFile =- selectedFiles.files.first;- final result = await PersonService.instance- .updateAvatar(- personEntity,- selectedFile,- );- Bus.instance.fire(- PeopleChangedEvent(- type: PeopleEventType.saveOrEditPerson,- person: result,- ),- );- Navigator.pop(context, result);- },- ),- );- },- ),- const SizedBox(height: 8),- ButtonWidget(- buttonType: ButtonType.secondary,- buttonAction: ButtonAction.cancel,- labelText: S.of(context).cancel,- // labelText: collection.hasCover- // ? S.of(context).resetToDefault- // : S.of(context).cancel,- icon: null,- // icon: collection.hasCover- // ? Icons.restore_outlined- // : null,- onTap: () async {- Navigator.of(context).pop();- },- ),- ],+ child: ValueListenableBuilder(+ valueListenable: isFileSelected,+ builder: (context, bool value, _) {+ return AnimatedSwitcher(+ duration: const Duration(milliseconds: 300),+ switchInCurve: Curves.easeInOutExpo,+ switchOutCurve: Curves.easeInOutExpo,+ child: ButtonWidget(+ key: ValueKey(value),+ isDisabled: !value,+ buttonType: ButtonType.neutral,+ labelText: S.of(context).useSelectedPhoto,+ onTap: () async {+ final selectedFile = selectedFiles.files.first;+ final result =+ await PersonService.instance.updateAvatar(+ personEntity,+ selectedFile,+ );+ Bus.instance.fire(+ PeopleChangedEvent(+ type: PeopleEventType.saveOrEditPerson,+ person: result,+ ),+ );+ Navigator.pop(context, result);+ },+ ),+ );+ },),),),diff --git a/mobile/lib/ui/viewer/location/pick_center_point_widget.dart b/mobile/lib/ui/viewer/location/pick_center_point_widget.dartindex 67234564f3..637476166a 100644--- a/mobile/lib/ui/viewer/location/pick_center_point_widget.dart+++ b/mobile/lib/ui/viewer/location/pick_center_point_widget.dart@@ -40,7 +40,7 @@ Future<Location?> showPickCenterPointSheet(topControl: const SizedBox.shrink(),backgroundColor: getEnteColorScheme(context).backgroundElevated,barrierColor: backdropFaintDark,- enableDrag: false,+ enableDrag: true,);}@@ -82,6 +82,7 @@ class PickCenterPointWidget extends StatelessWidget {title: S.of(context).pickCenterPoint,),caption: locationTagName ?? S.of(context).newLocation,+ showCloseButton: true,),Expanded(child: GalleryFilesState(@@ -138,39 +139,26 @@ class PickCenterPointWidget extends StatelessWidget {),),),- child: Column(- children: [- ValueListenableBuilder(- valueListenable: isFileSelected,- builder: (context, bool value, _) {- return AnimatedSwitcher(- duration: const Duration(milliseconds: 300),- switchInCurve: Curves.easeInOutExpo,- switchOutCurve: Curves.easeInOutExpo,- child: ButtonWidget(- key: ValueKey(value),- isDisabled: !value,- buttonType: ButtonType.neutral,- labelText: S.of(context).useSelectedPhoto,- onTap: () async {- final selectedLocation =- selectedFiles.files.first.location;- Navigator.pop(context, selectedLocation);- },- ),- );- },- ),- const SizedBox(height: 8),- ButtonWidget(- buttonType: ButtonType.secondary,- buttonAction: ButtonAction.cancel,- labelText: S.of(context).cancel,- onTap: () async {- Navigator.of(context).pop();- },- ),- ],+ child: ValueListenableBuilder(+ valueListenable: isFileSelected,+ builder: (context, bool value, _) {+ return AnimatedSwitcher(+ duration: const Duration(milliseconds: 300),+ switchInCurve: Curves.easeInOutExpo,+ switchOutCurve: Curves.easeInOutExpo,+ child: ButtonWidget(+ key: ValueKey(value),+ isDisabled: !value,+ buttonType: ButtonType.neutral,+ labelText: S.of(context).useSelectedPhoto,+ onTap: () async {+ final selectedLocation =+ selectedFiles.files.first.location;+ Navigator.pop(context, selectedLocation);+ },+ ),+ );+ },),),),