diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/more_view_actions.dart b/frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/more_view_actions.dart index e5aa04497a..1ae2ff35c3 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/more_view_actions.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/more_view_actions.dart @@ -8,7 +8,6 @@ import 'package:appflowy/workspace/presentation/widgets/more_view_actions/widget import 'package:appflowy/workspace/presentation/widgets/more_view_actions/widgets/font_size_action.dart'; import 'package:appflowy/workspace/presentation/widgets/more_view_actions/widgets/view_meta_info.dart'; import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-user/date_time.pbenum.dart'; import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart'; @@ -35,13 +34,11 @@ class MoreViewActions extends StatefulWidget { class _MoreViewActionsState extends State { late final List viewActions; - late final UserDateFormatPB dateFormat; final popoverMutex = PopoverMutex(); @override void initState() { super.initState(); - dateFormat = context.read().state.dateFormat; viewActions = ViewActionType.values .map( (type) => ViewAction( @@ -61,11 +58,15 @@ class _MoreViewActionsState extends State { @override Widget build(BuildContext context) { + final appearanceSettings = context.watch().state; + final dateFormat = appearanceSettings.dateFormat; + final timeFormat = appearanceSettings.timeFormat; + return BlocBuilder( builder: (context, state) { return AppFlowyPopover( mutex: popoverMutex, - constraints: BoxConstraints.loose(const Size(200, 400)), + constraints: BoxConstraints.loose(const Size(210, 400)), offset: const Offset(0, 30), popupBuilder: (_) { final actions = [ @@ -79,6 +80,7 @@ class _MoreViewActionsState extends State { const Divider(height: 4), ViewMetaInfo( dateFormat: dateFormat, + timeFormat: timeFormat, documentCounters: state.documentCounters, createdAt: state.createdAt, ), diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/widgets/view_meta_info.dart b/frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/widgets/view_meta_info.dart index f05842897f..f290286097 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/widgets/view_meta_info.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/widgets/more_view_actions/widgets/view_meta_info.dart @@ -12,11 +12,13 @@ class ViewMetaInfo extends StatelessWidget { const ViewMetaInfo({ super.key, required this.dateFormat, + required this.timeFormat, this.documentCounters, this.createdAt, }); final UserDateFormatPB dateFormat; + final UserTimeFormatPB timeFormat; final Counters? documentCounters; final DateTime? createdAt; @@ -47,8 +49,9 @@ class ViewMetaInfo extends StatelessWidget { if (documentCounters != null) const VSpace(2), FlowyText.regular( LocaleKeys.moreAction_createdAt.tr( - args: [dateFormat.formatDate(createdAt!, false)], + args: [dateFormat.formatDate(createdAt!, true, timeFormat)], ), + maxLines: 2, color: Theme.of(context).hintColor, ), ],