mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-18 18:33:49 +02:00
fix(message-date-label): take absolute value to prevent -x days ago
This commit is contained in:
parent
b8e22425a1
commit
3cec2ee1c6
1 changed files with 1 additions and 1 deletions
|
@ -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),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue