Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][locker] Open What's new from About (#13213)

aman-pilot574b23f93bb2
diff --git a/mobile/apps/locker/changes/whats-new-about.md b/mobile/apps/locker/changes/whats-new-about.md
new file mode 100644
index 0000000000..caa534a9d5
--- /dev/null
+++ b/mobile/apps/locker/changes/whats-new-about.md
@@ -0,0 +1 @@
+- Added What's new to Locker's About page.
diff --git a/mobile/apps/locker/lib/ui/settings/pages/about_page.dart b/mobile/apps/locker/lib/ui/settings/pages/about_page.dart
index ef0c8365fd..3ca78ff8a8 100644
--- a/mobile/apps/locker/lib/ui/settings/pages/about_page.dart
+++ b/mobile/apps/locker/lib/ui/settings/pages/about_page.dart
@@ -3,8 +3,10 @@ import "package:ente_strings/ente_strings.dart";
import "package:ente_ui/components/settings/about_settings_section.dart";
import "package:ente_ui/utils/toast_util.dart";
import "package:flutter/material.dart";
+import "package:hugeicons/hugeicons.dart";
import "package:locker/services/update_service.dart";
import "package:locker/ui/settings/app_update_sheet.dart";
+import "package:locker/ui/settings/widgets/change_log_sheet.dart";
class AboutPage extends StatelessWidget {
const AboutPage({super.key});
@@ -16,6 +18,12 @@ class AboutPage extends StatelessWidget {
return SettingsPageScaffold(
title: l10n.about,
children: [
+ SettingsItem(
+ title: l10n.whatsNew,
+ icon: HugeIcons.strokeRoundedParty,
+ onTap: () => _openChangeLog(context),
+ ),
+ const SizedBox(height: Spacing.sm),
AboutSettingsSection(
onCheckForUpdates: UpdateService.instance.isIndependent()
? () => _onCheckForUpdatesTapped(context)
@@ -25,6 +33,13 @@ class AboutPage extends StatelessWidget {
);
}
+ Future<void> _openChangeLog(BuildContext context) async {
+ await UpdateService.instance.markChangeLogShown();
+ if (context.mounted) {
+ await showChangeLogSheet(context);
+ }
+ }
+
Future<void> _onCheckForUpdatesTapped(BuildContext context) async {
final l10n = context.strings;
final shouldUpdate = await UpdateService.instance.shouldUpdate();
diff --git a/mobile/apps/locker/lib/ui/settings/search/settings_search_registry.dart b/mobile/apps/locker/lib/ui/settings/search/settings_search_registry.dart
index 241c18f0ef..109c614799 100644
--- a/mobile/apps/locker/lib/ui/settings/search/settings_search_registry.dart
+++ b/mobile/apps/locker/lib/ui/settings/search/settings_search_registry.dart
@@ -134,6 +134,13 @@ class SettingsSearchRegistry {
icon: HugeIcons.strokeRoundedInformationCircle,
routeBuilder: (_) => const AboutPage(),
),
+ SettingsSearchItem(
+ title: l10n.whatsNew,
+ sectionPath: l10n.about,
+ icon: HugeIcons.strokeRoundedParty,
+ routeBuilder: (_) => const AboutPage(),
+ keywords: ["changelog", "updates"],
+ ),
SettingsSearchItem(
title: l10n.weAreOpenSource,
sectionPath: l10n.about,