feat: Show time on message groups
Some checks failed
Main Deploy Workflow / deploy_web (push) Has been cancelled
Main Deploy Workflow / deploy_playstore_internal (push) Has been cancelled

This commit is contained in:
Alexey 2026-03-25 15:43:20 +03:00
commit 5931f4733f

View file

@ -102,10 +102,12 @@ class Message extends StatelessWidget {
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
var color = theme.colorScheme.surfaceContainerHigh;
final timeString = event.originServerTs.localizedTime(context);
final displayTime =
event.type == EventTypes.RoomCreate ||
nextEvent == null ||
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs);
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs) ||
nextEvent != null && timeString != nextEvent!.originServerTs.localizedTime(context);
final nextEventSameSender =
nextEvent != null &&
{
@ -249,7 +251,7 @@ class Message extends StatelessWidget {
vertical: 2.0,
),
child: Text(
event.originServerTs.localizedTime(context),
timeString,
style: TextStyle(
fontSize: 12 * AppSettings.fontSizeFactor.value,
fontWeight: FontWeight.bold,