Fix code formatting
This commit is contained in:
parent
4e7181a20f
commit
5cd8f56895
2 changed files with 6 additions and 13 deletions
|
@ -12,8 +12,7 @@ import 'package:recon/widgets/generic_avatar.dart';
|
|||
import 'package:recon/widgets/messages/messages_list.dart';
|
||||
|
||||
class FriendListTile extends StatelessWidget {
|
||||
const FriendListTile(
|
||||
{required this.friend, required this.unreads, this.onTap, super.key});
|
||||
const FriendListTile({required this.friend, required this.unreads, this.onTap, super.key});
|
||||
|
||||
final Friend friend;
|
||||
final int unreads;
|
||||
|
@ -26,8 +25,7 @@ class FriendListTile extends StatelessWidget {
|
|||
final mClient = Provider.of<MessagingClient>(context, listen: false);
|
||||
final currentSession = friend.userStatus.currentSessionIndex == -1
|
||||
? null
|
||||
: friend.userStatus.decodedSessions
|
||||
.elementAtOrNull(friend.userStatus.currentSessionIndex);
|
||||
: friend.userStatus.decodedSessions.elementAtOrNull(friend.userStatus.currentSessionIndex);
|
||||
return ListTile(
|
||||
leading: GenericAvatar(
|
||||
imageUri: imageUri,
|
||||
|
@ -35,8 +33,7 @@ class FriendListTile extends StatelessWidget {
|
|||
trailing: unreads != 0
|
||||
? Text(
|
||||
"+$unreads",
|
||||
style: theme.textTheme.bodyMedium
|
||||
?.copyWith(color: theme.colorScheme.primary),
|
||||
style: theme.textTheme.bodyMedium?.copyWith(color: theme.colorScheme.primary),
|
||||
)
|
||||
: null,
|
||||
title: Row(
|
||||
|
@ -61,8 +58,7 @@ class FriendListTile extends StatelessWidget {
|
|||
const SizedBox(
|
||||
width: 4,
|
||||
),
|
||||
Text(toBeginningOfSentenceCase(friend.userStatus.onlineStatus.name) ??
|
||||
"Unknown"),
|
||||
Text(toBeginningOfSentenceCase(friend.userStatus.onlineStatus.name) ?? "Unknown"),
|
||||
if (!(friend.userStatus.onlineStatus == OnlineStatus.offline ||
|
||||
friend.userStatus.onlineStatus == OnlineStatus.invisible))
|
||||
if (currentSession != null) ...[
|
||||
|
|
|
@ -9,8 +9,7 @@ class FriendOnlineStatusIndicator extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return userStatus.appVersion.contains("ReCon") &&
|
||||
userStatus.onlineStatus != OnlineStatus.offline
|
||||
return userStatus.appVersion.contains("ReCon") && userStatus.onlineStatus != OnlineStatus.offline
|
||||
? SizedBox.square(
|
||||
dimension: 10,
|
||||
child: Image.asset(
|
||||
|
@ -21,9 +20,7 @@ class FriendOnlineStatusIndicator extends StatelessWidget {
|
|||
),
|
||||
)
|
||||
: Icon(
|
||||
userStatus.onlineStatus == OnlineStatus.offline
|
||||
? Icons.circle_outlined
|
||||
: Icons.circle,
|
||||
userStatus.onlineStatus == OnlineStatus.offline ? Icons.circle_outlined : Icons.circle,
|
||||
color: userStatus.onlineStatus.color(context),
|
||||
size: 10,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue