chore: Follow up listtilehover
This commit is contained in:
parent
1b95694a58
commit
54ba4544af
1 changed files with 254 additions and 249 deletions
|
|
@ -103,7 +103,8 @@ class ChatListItem extends StatelessWidget {
|
|||
color: backgroundColor,
|
||||
child: FutureBuilder(
|
||||
future: room.loadHeroUsers(),
|
||||
builder: (context, snapshot) => ListTile(
|
||||
builder: (context, snapshot) => HoverBuilder(
|
||||
builder: (context, listTileHovered) => ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -0.5),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
onLongPress: () => onLongPress?.call(context),
|
||||
|
|
@ -144,8 +145,9 @@ class ChatListItem extends StatelessWidget {
|
|||
? room.isSpace
|
||||
? BorderSide(
|
||||
width: 0,
|
||||
color:
|
||||
Theme.of(context).colorScheme.outline,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.outline,
|
||||
)
|
||||
: null
|
||||
: BorderSide(
|
||||
|
|
@ -168,7 +170,7 @@ class ChatListItem extends StatelessWidget {
|
|||
onTap: () => onLongPress?.call(context),
|
||||
),
|
||||
),
|
||||
if (hovered)
|
||||
if (listTileHovered)
|
||||
Positioned(
|
||||
top: -2,
|
||||
right: -2,
|
||||
|
|
@ -299,7 +301,8 @@ class ChatListItem extends StatelessWidget {
|
|||
room.lastEvent?.senderId),
|
||||
)
|
||||
: null,
|
||||
initialData: lastEvent?.calcLocalizedBodyFallback(
|
||||
initialData:
|
||||
lastEvent?.calcLocalizedBodyFallback(
|
||||
MatrixLocals(L10n.of(context)!),
|
||||
hideReply: true,
|
||||
hideEdit: true,
|
||||
|
|
@ -349,7 +352,8 @@ class ChatListItem extends StatelessWidget {
|
|||
: hasNotifications || room.markedUnread
|
||||
? theme.colorScheme.primary
|
||||
: theme.colorScheme.primaryContainer,
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
borderRadius:
|
||||
BorderRadius.circular(AppConfig.borderRadius),
|
||||
),
|
||||
child: Center(
|
||||
child: hasNotifications
|
||||
|
|
@ -379,6 +383,7 @@ class ChatListItem extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue