|
|
@ -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
|
|
|
|