chore(ui): bump jiffy to v6.2.1
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
+3
-3
@@ -287,16 +287,16 @@ class ChannelLastMessageDate extends StatelessWidget {
|
||||
|
||||
if (lastMessageAt.millisecondsSinceEpoch >=
|
||||
startOfDay.millisecondsSinceEpoch) {
|
||||
stringDate = Jiffy(lastMessageAt.toLocal()).jm;
|
||||
stringDate = Jiffy.parseFromDateTime(lastMessageAt.toLocal()).jm;
|
||||
} else if (lastMessageAt.millisecondsSinceEpoch >=
|
||||
startOfDay
|
||||
.subtract(const Duration(days: 1))
|
||||
.millisecondsSinceEpoch) {
|
||||
stringDate = context.translations.yesterdayLabel;
|
||||
} else if (startOfDay.difference(lastMessageAt).inDays < 7) {
|
||||
stringDate = Jiffy(lastMessageAt.toLocal()).EEEE;
|
||||
stringDate = Jiffy.parseFromDateTime(lastMessageAt.toLocal()).EEEE;
|
||||
} else {
|
||||
stringDate = Jiffy(lastMessageAt.toLocal()).yMd;
|
||||
stringDate = Jiffy.parseFromDateTime(lastMessageAt.toLocal()).yMd;
|
||||
}
|
||||
|
||||
return Text(
|
||||
|
||||
+2
-2
@@ -227,9 +227,9 @@ class MessageSearchTileMessageDate extends StatelessWidget {
|
||||
if (now.year != createdAt.year ||
|
||||
now.month != createdAt.month ||
|
||||
now.day != createdAt.day) {
|
||||
stringDate = Jiffy(createdAt.toLocal()).yMd;
|
||||
stringDate = Jiffy.parseFromDateTime(createdAt.toLocal()).yMd;
|
||||
} else {
|
||||
stringDate = Jiffy(createdAt.toLocal()).jm;
|
||||
stringDate = Jiffy.parseFromDateTime(createdAt.toLocal()).jm;
|
||||
}
|
||||
|
||||
return Text(
|
||||
|
||||
+2
-1
@@ -176,11 +176,12 @@ class UserLastActive extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final chatTheme = StreamChatTheme.of(context);
|
||||
final lastActive = user.lastActive ?? DateTime.now();
|
||||
return Text(
|
||||
user.online
|
||||
? context.translations.userOnlineText
|
||||
: '${context.translations.userLastOnlineText} '
|
||||
'${Jiffy(user.lastActive).fromNow()}',
|
||||
'${Jiffy.parseFromDateTime(lastActive).fromNow()}',
|
||||
style: chatTheme.textTheme.footnote.copyWith(
|
||||
color: chatTheme.colorTheme.textHighEmphasis.withOpacity(0.5),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user