Skip to content

armgit / ente

Public Imported from GitHub
0

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

Merge main

ashilkn3e59e7286fcd
diff --cc mobile/apps/photos/lib/ui/settings/gallery_settings_screen.dart
index 4fda8cbb18,41238a2057..cda8b73de1
--- a/mobile/apps/photos/lib/ui/settings/gallery_settings_screen.dart
+++ b/mobile/apps/photos/lib/ui/settings/gallery_settings_screen.dart
@@@ -40,134 -36,126 +35,109 @@@ class _GallerySettingsScreenState exten
@override
Widget build(BuildContext context) {
final colorScheme = getEnteColorScheme(context);
+ final textTheme = getEnteTextTheme(context);
+ final isDarkMode = Theme.of(context).brightness == Brightness.dark;
+
+ final pageBackgroundColor =
+ isDarkMode ? const Color(0xFF161616) : const Color(0xFFFAFAFA);
+
return Scaffold(
- body: CustomScrollView(
- primary: false,
- slivers: <Widget>[
- TitleBarWidget(
- flexibleSpaceTitle: TitleBarTitleWidget(
- title: AppLocalizations.of(context).gallery,
- ),
- actionIcons: widget.fromGalleryLayoutSettingsCTA
- ? null
- : [
- IconButtonWidget(
- icon: Icons.close_outlined,
- iconButtonType: IconButtonType.secondary,
- onTap: () {
- Navigator.pop(context);
- if (!widget.fromGalleryLayoutSettingsCTA) {
- Navigator.pop(context);
- }
- },
- ),
- ],
- ),
- SliverList(
- delegate: SliverChildBuilderDelegate(
- (delegateBuildContext, index) {
- return Padding(
- padding:
- const EdgeInsets.symmetric(horizontal: 16, vertical: 20),
+ backgroundColor: pageBackgroundColor,
+ body: SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const SizedBox(height: 24),
+ GestureDetector(
+ onTap: () => Navigator.of(context).pop(),
+ child: Icon(
+ Icons.arrow_back,
+ color: colorScheme.strokeBase,
+ size: 24,
+ ),
+ ),
+ const SizedBox(height: 24),
+ Text(
+ AppLocalizations.of(context).gallery,
+ style: textTheme.h3Bold,
+ ),
+ const SizedBox(height: 24),
+ Expanded(
+ child: SingleChildScrollView(
child: Column(
- mainAxisSize: MainAxisSize.min,
children: [
- GestureDetector(
- onTap: () {
- routeToPage(
+ MenuItemWidgetNew(
+ title: AppLocalizations.of(context).photoGridSize,
+ trailingWidget: Text(
+ _photoGridSize.toString(),
+ style: textTheme.small,
+ ),
+ trailingIcon: Icons.chevron_right_outlined,
+ trailingIconIsMuted: true,
+ onTap: () async {
+ await routeToPage(
context,
const PhotoGridSizePickerPage(),
- ).then((value) {
- setState(() {
- _photoGridSize = localSettings.getPhotoGridSize();
- });
+ );
+ setState(() {
+ _photoGridSize = localSettings.getPhotoGridSize();
});
},
- child: MenuItemWidget(
- captionedTextWidget: CaptionedTextWidget(
- title: AppLocalizations.of(context).photoGridSize,
- subTitle: _photoGridSize.toString(),
- ),
- menuItemColor: colorScheme.fillFaint,
- trailingWidget: Icon(
- Icons.chevron_right_outlined,
- color: colorScheme.strokeBase,
- ),
- singleBorderRadius: 8,
- alignCaptionedTextToLeft: true,
- isGestureDetectorDisabled: true,
- ),
- ),
- const SizedBox(
- height: 24,
),
- GestureDetector(
- onTap: () {
- routeToPage(
+ const SizedBox(height: 8),
+ MenuItemWidgetNew(
+ title: AppLocalizations.of(context).groupBy,
+ trailingWidget: Text(
+ _groupType,
+ style: textTheme.small,
+ ),
+ trailingIcon: Icons.chevron_right_outlined,
+ trailingIconIsMuted: true,
+ onTap: () async {
+ await routeToPage(
context,
const GalleryGroupTypePickerPage(),
- ).then((value) {
- setState(() {
- _groupType =
- localSettings.getGalleryGroupType().name;
- });
+ );
+ setState(() {
+ _groupType =
+ localSettings.getGalleryGroupType().name;
});
},
- child: MenuItemWidget(
- captionedTextWidget: CaptionedTextWidget(
- title: AppLocalizations.of(context).groupBy,
- subTitle: _groupType,
- ),
- menuItemColor: colorScheme.fillFaint,
- trailingWidget: Icon(
- Icons.chevron_right_outlined,
- color: colorScheme.strokeBase,
- ),
- singleBorderRadius: 8,
- alignCaptionedTextToLeft: true,
- isGestureDetectorDisabled: true,
- ),
),
- const SizedBox(
- height: 24,
- ),
- widget.fromGalleryLayoutSettingsCTA
- ? const SizedBox.shrink()
- : MenuItemWidget(
- captionedTextWidget: CaptionedTextWidget(
- title: AppLocalizations.of(context)
- .hideSharedItemsFromHomeGallery,
- ),
- menuItemColor: colorScheme.fillFaint,
- singleBorderRadius: 8,
- alignCaptionedTextToLeft: true,
- trailingWidget: ToggleSwitchWidget(
- value: () => localSettings
- .hideSharedItemsFromHomeGallery,
- onChanged: () async {
- final prevSetting = localSettings
- .hideSharedItemsFromHomeGallery;
- await localSettings
- .setHideSharedItemsFromHomeGallery(
- !prevSetting,
- );
+ if (!widget.fromGalleryLayoutSettingsCTA) ...[
+ const SizedBox(height: 8),
+ MenuItemWidgetNew(
+ title: AppLocalizations.of(context)
+ .hideSharedItemsFromHomeGallery,
+ trailingWidget: ToggleSwitchWidget(
+ value: () =>
+ localSettings.hideSharedItemsFromHomeGallery,
+ onChanged: () async {
+ final prevSetting =
+ localSettings.hideSharedItemsFromHomeGallery;
+ await localSettings
+ .setHideSharedItemsFromHomeGallery(
+ !prevSetting,
+ );
- Bus.instance.fire(
- HideSharedItemsFromHomeGalleryEvent(
- !prevSetting,
- ),
- );
- },
- ),
- ),
+ Bus.instance.fire(
+ HideSharedItemsFromHomeGalleryEvent(
+ !prevSetting,
+ ),
+ );
+ },
+ ),
+ ),
- const SizedBox(height: 8),
- MenuItemWidgetNew(
- title: AppLocalizations.of(context).swipeToSelect,
- trailingWidget: ToggleSwitchWidget(
- value: () => localSettings.isSwipeToSelectEnabled,
- onChanged: () async {
- final prevSetting =
- localSettings.isSwipeToSelectEnabled;
- await localSettings
- .setSwipeToSelectEnabled(!prevSetting);
-
- Bus.instance.fire(
- SwipeToSelectEnabledEvent(!prevSetting),
- );
- },
- ),
- ),
+ ],
],
),
- );
- },
- childCount: 1,
- ),
+ ),
+ ),
+ ],
),
- ],
+ ),
),
);
}
diff --cc mobile/apps/photos/scripts/internal_changes.txt
index 06c7a3b566,ad38070ef1..bbdd748503
--- a/mobile/apps/photos/scripts/internal_changes.txt
+++ b/mobile/apps/photos/scripts/internal_changes.txt
@@@ -1,4 -1,5 +1,6 @@@
+- Ashil: QOL: Enalbe swipe to select on Samsung S series devices after fixing issue introduced by it.
+ - Ashil: QOL: Fix home gallery getting cut on the right end on landscape mode (affects tablets)
+ - Ashil: QOL: Fix uncategorized page not updating after move
- Ashil: QOL: Pause video when using jump to date
- Ashil: QOL(perf): Potential perf improvement when there are lot of shared files in gallery (Optimized PersonFaceWidget that displays face thumbnail)
- Ashil: QOL: Pinch to zoom on video