mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 22:42:33 +01:00
chore: Minor design changes in chatlist item
This commit is contained in:
parent
d9590dd4e8
commit
69771122b1
@ -10,13 +10,10 @@ class SimpleDialogs {
|
||||
|
||||
Future<dynamic> tryRequestWithLoadingDialog(Future<dynamic> request,
|
||||
{Function(MatrixException) onAdditionalAuth}) async {
|
||||
var completed = false;
|
||||
final futureResult = tryRequestWithErrorToast(
|
||||
request,
|
||||
onAdditionalAuth: onAdditionalAuth,
|
||||
).whenComplete(() => completed = true);
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
if (completed) return futureResult;
|
||||
);
|
||||
return showDialog<dynamic>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
|
@ -163,25 +163,14 @@ class ChatListItem extends StatelessWidget {
|
||||
softWrap: false,
|
||||
),
|
||||
),
|
||||
room.isFavourite
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 4.0),
|
||||
child: Icon(
|
||||
Icons.favorite_rounded,
|
||||
size: 16,
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
isMuted
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 4.0),
|
||||
child: Icon(
|
||||
Icons.notifications_off_outlined,
|
||||
size: 16,
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
if (isMuted)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 4.0),
|
||||
child: Icon(
|
||||
Icons.notifications_off_outlined,
|
||||
size: 16,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 4.0),
|
||||
child: Text(
|
||||
@ -250,26 +239,35 @@ class ChatListItem extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
room.notificationCount > 0
|
||||
? Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 7),
|
||||
height: 20,
|
||||
decoration: BoxDecoration(
|
||||
color: room.highlightCount > 0
|
||||
? Colors.red
|
||||
: Theme.of(context).primaryColor,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
if (room.isFavourite)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
right: room.notificationCount > 0 ? 4.0 : 0.0),
|
||||
child: Icon(
|
||||
Icons.favorite_rounded,
|
||||
size: 20,
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
),
|
||||
if (room.notificationCount > 0)
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 7),
|
||||
height: 20,
|
||||
decoration: BoxDecoration(
|
||||
color: room.highlightCount > 0
|
||||
? Colors.red
|
||||
: Theme.of(context).primaryColor,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
room.notificationCount.toString(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
room.notificationCount.toString(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: Text(' '),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
onTap: () => clickAction(context),
|
||||
|
Loading…
Reference in New Issue
Block a user