Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mob] Move manage device cache option from Advance to Free up space #4265

Merged
merged 2 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mobile/lib/generated/intl/messages_en.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions mobile/lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion mobile/lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@
"description": "The text to display in the advanced settings section"
},
"photoGridSize": "Photo grid size",
"manageDeviceStorage": "Manage device storage",
"manageDeviceStorage": "Manage device Cache",
"manageDeviceStorageDesc": "Review and clear local cache storage.",
"machineLearning": "Machine learning",
"mlConsent": "Enable machine learning",
"mlConsentTitle": "Enable machine learning?",
Expand Down
20 changes: 0 additions & 20 deletions mobile/lib/ui/settings/advanced_settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import 'package:photos/ui/components/title_bar_title_widget.dart';
import 'package:photos/ui/components/title_bar_widget.dart';
import "package:photos/ui/components/toggle_switch_widget.dart";
import "package:photos/ui/settings/ml/machine_learning_settings_page.dart";
import 'package:photos/ui/tools/debug/app_storage_viewer.dart';
import 'package:photos/ui/viewer/gallery/photo_grid_size_picker_page.dart';
import 'package:photos/utils/navigation_util.dart';

Expand Down Expand Up @@ -124,25 +123,6 @@ class _AdvancedSettingsScreenState extends State<AdvancedSettingsScreen> {
const SizedBox(
height: 24,
),
MenuItemWidget(
captionedTextWidget: CaptionedTextWidget(
title: S.of(context).manageDeviceStorage,
),
menuItemColor: colorScheme.fillFaint,
trailingWidget: Icon(
Icons.chevron_right_outlined,
color: colorScheme.strokeBase,
),
singleBorderRadius: 8,
alignCaptionedTextToLeft: true,
onTap: () async {
// ignore: unawaited_futures
routeToPage(context, const AppStorageViewer());
},
),
const SizedBox(
height: 24,
),
MenuItemWidget(
captionedTextWidget: CaptionedTextWidget(
title: S.of(context).showMemories,
Expand Down
31 changes: 31 additions & 0 deletions mobile/lib/ui/settings/backup/free_space_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import "package:photos/ui/components/menu_section_description_widget.dart";
import "package:photos/ui/components/models/button_type.dart";
import 'package:photos/ui/components/title_bar_title_widget.dart';
import 'package:photos/ui/components/title_bar_widget.dart';
import "package:photos/ui/tools/debug/app_storage_viewer.dart";
import "package:photos/ui/tools/deduplicate_page.dart";
import "package:photos/ui/tools/free_space_page.dart";
import "package:photos/ui/viewer/gallery/large_files_page.dart";
Expand Down Expand Up @@ -71,6 +72,7 @@ class _FreeUpSpaceOptionsScreenState extends State<FreeUpSpaceOptionsScreen> {
padding: const EdgeInsets.symmetric(vertical: 20),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
children: [
Expand Down Expand Up @@ -208,6 +210,35 @@ class _FreeUpSpaceOptionsScreenState extends State<FreeUpSpaceOptionsScreen> {
MenuSectionDescriptionWidget(
content: S.of(context).viewLargeFilesDesc,
),
const SizedBox(
height: 24,
),
MenuItemWidget(
captionedTextWidget: CaptionedTextWidget(
title: S.of(context).manageDeviceStorage,
),
menuItemColor: colorScheme.fillFaint,
trailingWidget: Icon(
Icons.chevron_right_outlined,
color: colorScheme.strokeBase,
),
singleBorderRadius: 8,
alignCaptionedTextToLeft: true,
onTap: () async {
// ignore: unawaited_futures
routeToPage(
context,
const AppStorageViewer(),
);
},
),
Align(
alignment: Alignment.centerLeft,
child: MenuSectionDescriptionWidget(
content:
S.of(context).manageDeviceStorageDesc,
),
),
],
),
],
Expand Down