fix time
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run

This commit is contained in:
otsmr 2026-08-05 00:08:19 +02:00
parent 6487efce35
commit ce0cd5342a
2 changed files with 15 additions and 2 deletions

View file

@ -41,7 +41,11 @@ class _LastMessageTimeCompState extends State<LastMessageTimeComp> {
_actionSubscription = null; _actionSubscription = null;
if (widget.message != null) { if (widget.message != null) {
if (widget.message!.senderId == null) {
targetTime = widget.message!.openedAt ?? widget.message!.createdAt; targetTime = widget.message!.openedAt ?? widget.message!.createdAt;
} else {
targetTime = widget.message!.createdAt;
}
_updateSeconds(); _updateSeconds();
} else if (widget.dateTime != null) { } else if (widget.dateTime != null) {
targetTime = widget.dateTime; targetTime = widget.dateTime;

View file

@ -2,6 +2,7 @@ import 'dart:async';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:twonly/locator.dart'; import 'package:twonly/locator.dart';
import 'package:twonly/src/database/daos/contacts.dao.dart'; import 'package:twonly/src/database/daos/contacts.dao.dart';
@ -206,7 +207,15 @@ class _MessageInfoViewState extends State<MessageInfoView> {
'${context.lang.received}: ${friendlyDateTime(context, widget.message.ackByServer!)}', '${context.lang.received}: ${friendlyDateTime(context, widget.message.ackByServer!)}',
), ),
if (userService.currentUser.isDeveloper) if (userService.currentUser.isDeveloper)
Text('ID: ${widget.message.messageId}'), GestureDetector(
onTap: () async {
await Clipboard.setData(
ClipboardData(text: widget.message.messageId),
);
await HapticFeedback.heavyImpact();
},
child: Text('ID: ${widget.message.messageId}'),
),
if (messageHistory.isNotEmpty) ...[ if (messageHistory.isNotEmpty) ...[
const SizedBox(height: 10), const SizedBox(height: 10),
const Divider(), const Divider(),