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>
This commit is contained in:
shenlong 2025-07-27 23:13:23 +05:30 committed by GitHub
parent d15f67da5d
commit 708e42d8a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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),
);
}

View File

@ -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(),