Revert "design: New date separators in timeline"

This reverts commit f15b81c5a6.
This commit is contained in:
Krille 2024-03-27 08:54:15 +01:00
commit 554f951a30
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
6 changed files with 79 additions and 134 deletions

View file

@ -45,7 +45,7 @@ extension DateTimeExtension on DateTime {
/// Returns [localizedTimeOfDay()] if the ChatTime is today, the name of the week
/// day if the ChatTime is this week and a date string else.
String localizedTimeShort(BuildContext context, {bool dateOnly = false}) {
String localizedTimeShort(BuildContext context) {
final now = DateTime.now();
final sameYear = now.year == year;
@ -58,7 +58,7 @@ extension DateTimeExtension on DateTime {
1000 * 60 * 60 * 24 * 7;
if (sameDay) {
return dateOnly ? L10n.of(context)!.today : localizedTimeOfDay(context);
return localizedTimeOfDay(context);
} else if (sameWeek) {
return DateFormat.EEEE(Localizations.localeOf(context).languageCode)
.format(this);
@ -92,9 +92,5 @@ extension DateTimeExtension on DateTime {
);
}
bool isSameDate(DateTime other) {
return year == other.year && month == other.month && day == other.day;
}
static String _z(int i) => i < 10 ? '0${i.toString()}' : i.toString();
}