Removed Jiffy

This commit is contained in:
rlee1990
2023-06-06 12:11:25 -04:00
parent 4dcc747f94
commit ba3f61fa15
4 changed files with 6 additions and 7 deletions
@@ -108,7 +108,7 @@ class _ConnectedTitleState extends StatelessWidget {
} else {
alternativeWidget = Text(
'${context.translations.userLastOnlineText} '
'${Jiffy(otherMember.user!.lastActive!).fromNow()}',
'${Jiffy(otherMember.user?.lastActive).fromNow()}',
style: textStyle,
);
}
@@ -666,12 +666,11 @@ class _StreamMessageListViewState extends State<StreamMessageListView> {
final createdAt = message.createdAt.toLocal();
final nextCreatedAt = nextMessage.createdAt.toLocal();
if (!Jiffy(createdAt)
.isSame(Jiffy(nextCreatedAt), Units.DAY)) {
if (!Jiffy(createdAt).isSame(nextCreatedAt, Units.DAY)) {
separator = _buildDateDivider(nextMessage);
} else {
final hasTimeDiff = !Jiffy(createdAt).isSame(
Jiffy(nextCreatedAt),
nextCreatedAt,
Units.MINUTE,
);
@@ -1063,7 +1062,7 @@ class _StreamMessageListViewState extends State<StreamMessageListView> {
var hasTimeDiff = false;
if (nextMessage != null) {
hasTimeDiff = !Jiffy(message.createdAt.toLocal()).isSame(
Jiffy(nextMessage.createdAt.toLocal()),
nextMessage.createdAt.toLocal(),
Units.MINUTE,
);
}
@@ -179,7 +179,7 @@ class UserLastActive extends StatelessWidget {
user.online
? context.translations.userOnlineText
: '${context.translations.userLastOnlineText} '
'${Jiffy(user.lastActive!).fromNow()}',
'${Jiffy(user.lastActive).fromNow()}',
style: chatTheme.textTheme.footnote.copyWith(
color: chatTheme.colorTheme.textHighEmphasis.withOpacity(0.5),
),
@@ -77,7 +77,7 @@ class StreamUserItem extends StatelessWidget {
user.online
? context.translations.userOnlineText
: '${context.translations.userLastOnlineText} '
'${Jiffy(user.lastActive!).fromNow()}',
'${Jiffy(user.lastActive).fromNow()}',
style: chatTheme.textTheme.footnote.copyWith(
color: chatTheme.colorTheme.textHighEmphasis.withOpacity(0.5),
),