move to new sdk

This commit is contained in:
Sorunome 2020-06-10 08:07:01 +00:00 committed by Christian Pauly
commit 6868f38c7c
26 changed files with 172 additions and 201 deletions

View file

@ -10,11 +10,13 @@ extension RoomStatusExtension on Room {
String getLocalizedStatus(BuildContext context) {
if (isDirectChat) {
if (directChatPresence != null) {
if (directChatPresence.currentlyActive == true) {
if (directChatPresence.presence.currentlyActive == true) {
return L10n.of(context).currentlyActive;
}
return L10n.of(context)
.lastActiveAgo(directChatPresence.time.localizedTimeShort(context));
return L10n.of(context).lastActiveAgo(
DateTime.fromMillisecondsSinceEpoch(
directChatPresence.presence.lastActiveAgo)
.localizedTimeShort(context));
}
return L10n.of(context).lastSeenLongTimeAgo;
}