Removed Jiffy
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user