chore: Follow up presences
This commit is contained in:
parent
5e0d4dab58
commit
a98a904043
2 changed files with 10 additions and 2 deletions
|
|
@ -40,7 +40,11 @@ class UserBottomSheetView extends StatelessWidget {
|
||||||
userId: userId,
|
userId: userId,
|
||||||
client: client,
|
client: client,
|
||||||
builder: (context, presence) {
|
builder: (context, presence) {
|
||||||
if (presence == null) return const SizedBox.shrink();
|
if (presence == null ||
|
||||||
|
(presence.presence == PresenceType.offline &&
|
||||||
|
presence.lastActiveTimestamp == null)) {
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
|
|
||||||
final dotColor = presence.presence.isOnline
|
final dotColor = presence.presence.isOnline
|
||||||
? Colors.green
|
? Colors.green
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,11 @@ class Avatar extends StatelessWidget {
|
||||||
PresenceBuilder(
|
PresenceBuilder(
|
||||||
userId: presenceUserId,
|
userId: presenceUserId,
|
||||||
builder: (context, presence) {
|
builder: (context, presence) {
|
||||||
if (presence == null) return const SizedBox.shrink();
|
if (presence == null ||
|
||||||
|
(presence.presence == PresenceType.offline &&
|
||||||
|
presence.lastActiveTimestamp == null)) {
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
final dotColor = presence.presence.isOnline
|
final dotColor = presence.presence.isOnline
|
||||||
? Colors.green
|
? Colors.green
|
||||||
: presence.presence.isUnavailable
|
: presence.presence.isUnavailable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue