mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-25 10:50:40 +01:00
refactor: Select chat list item logic
This commit is contained in:
parent
19fc1378fb
commit
cd1f8cc386
@ -146,10 +146,10 @@ class ChatListItem extends StatelessWidget {
|
||||
? 20.0
|
||||
: 14.0
|
||||
: 0.0;
|
||||
return Center(
|
||||
child: Material(
|
||||
color: FluffyThemes.chatListItemColor(context, activeChat, selected),
|
||||
child: ListTile(
|
||||
return ListTile(
|
||||
selected: selected,
|
||||
selectedTileColor:
|
||||
FluffyThemes.chatListItemColor(context, activeChat, selected),
|
||||
onLongPress: onLongPress,
|
||||
leading: selected
|
||||
? Container(
|
||||
@ -271,8 +271,7 @@ class ChatListItem extends StatelessWidget {
|
||||
color: room.isUnread
|
||||
? Theme.of(context).colorScheme.secondary
|
||||
: null,
|
||||
fontWeight:
|
||||
room.isUnread ? FontWeight.bold : null,
|
||||
fontWeight: room.isUnread ? FontWeight.bold : null,
|
||||
decoration: room.lastEvent?.redacted == true
|
||||
? TextDecoration.lineThrough
|
||||
: null,
|
||||
@ -309,8 +308,6 @@ class ChatListItem extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
onTap: () => clickAction(context),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user