fix(message-date-label): take absolute value to prevent -x days ago

This commit is contained in:
Kiril Tijsma 2025-03-10 08:40:59 +01:00 committed by FlutterJoey
parent 0aee5e8285
commit d52b558794

View file

@ -168,7 +168,7 @@ class ChatTranslations {
-1 => "Yesterday",
1 => "Tomorrow",
int value when value < 5 && value > 1 => "In $value days",
int value when value < -1 && value > -5 => "$value days ago",
int value when value < -1 && value > -5 => "${value.abs()} days ago",
_ => DateFormat("dd-MM-YYYY").format(time),
};