From 708e42d8a3e54f8177b241b658b55d71fd8311da Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Sun, 27 Jul 2025 23:13:23 +0530 Subject: [PATCH] fix: change translation key for archive action button (#20336) * chore: change translation key for archive action button * chore: await navigation before emitting event --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../action_buttons/archive_action_button.widget.dart | 2 +- .../widgets/memory/memory_bottom_info.widget.dart | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart index f17bf553ce..e461a9028e 100644 --- a/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/archive_action_button.widget.dart @@ -46,7 +46,7 @@ class ArchiveActionButton extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { return BaseActionButton( iconData: Icons.archive_outlined, - label: "archive".t(context: context), + label: "to_archive".t(context: context), onPressed: () => _onTap(context, ref), ); } diff --git a/mobile/lib/presentation/widgets/memory/memory_bottom_info.widget.dart b/mobile/lib/presentation/widgets/memory/memory_bottom_info.widget.dart index 4d8bf2d014..943b74288f 100644 --- a/mobile/lib/presentation/widgets/memory/memory_bottom_info.widget.dart +++ b/mobile/lib/presentation/widgets/memory/memory_bottom_info.widget.dart @@ -49,9 +49,9 @@ class DriftMemoryBottomInfo extends StatelessWidget { message: 'view_in_timeline'.tr(), child: MaterialButton( minWidth: 0, - onPressed: () { - context.maybePop(); - context.navigateTo(const TabShellRoute(children: [MainTimelineRoute()])); + onPressed: () async { + await context.maybePop(); + await context.navigateTo(const TabShellRoute(children: [MainTimelineRoute()])); EventStream.shared.emit(ScrollToDateEvent(fileCreatedDate)); }, shape: const CircleBorder(),