show message timestamp in local tz
This commit is contained in:
@@ -140,6 +140,7 @@ class _MessageViewPageState extends State<MessageViewPage> {
|
||||
|
||||
Widget _buildMessageView(BuildContext context, SCNMessage message, ChannelPreview? channel, KeyTokenPreview? token, UserPreview? user) {
|
||||
final userAccUserID = context.select<AppAuth, String?>((v) => v.userID);
|
||||
final dateFormat = context.select<AppSettings, AppSettingsDateFormat>((v) => v.dateFormat).dateFormat();
|
||||
|
||||
var cfg = AppSettings();
|
||||
|
||||
@@ -229,7 +230,7 @@ class _MessageViewPageState extends State<MessageViewPage> {
|
||||
}
|
||||
: null,
|
||||
),
|
||||
UI.metaCard(context: context, icon: FontAwesomeIcons.solidTimer, title: 'Timestamp', values: [message.timestamp]),
|
||||
UI.metaCard(context: context, icon: FontAwesomeIcons.solidTimer, title: 'Timestamp', values: [dateFormat.format(DateTime.parse(message.timestamp).toLocal())]),
|
||||
if (cfg.showExtendedAttributes)
|
||||
UI.metaCard(
|
||||
context: context,
|
||||
@@ -319,7 +320,7 @@ class _MessageViewPageState extends State<MessageViewPage> {
|
||||
children: [
|
||||
UI.channelChip(context: context, text: _resolveChannelName(channel, message), margin: const EdgeInsets.fromLTRB(0, 0, 4, 0), fontSize: 16),
|
||||
Expanded(child: SizedBox()),
|
||||
Text(dateFormat.format(DateTime.parse(message.timestamp)), style: const TextStyle(fontSize: 14)),
|
||||
Text(dateFormat.format(DateTime.parse(message.timestamp).toLocal()), style: const TextStyle(fontSize: 14)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
|
||||
Reference in New Issue
Block a user