mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
chore: Context icon improvements
This commit is contained in:
parent
377b06a462
commit
6381cea62d
@ -244,7 +244,7 @@ class ChatListItem extends StatelessWidget {
|
|||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
right: room.notificationCount > 0 ? 4.0 : 0.0),
|
right: room.notificationCount > 0 ? 4.0 : 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.favorite_rounded,
|
Icons.push_pin_outlined,
|
||||||
size: 20,
|
size: 20,
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
),
|
),
|
||||||
|
@ -208,6 +208,12 @@ class _ChatListState extends State<ChatList> {
|
|||||||
if (selectMode == SelectMode.share) {
|
if (selectMode == SelectMode.share) {
|
||||||
_selectedRoomIds.clear();
|
_selectedRoomIds.clear();
|
||||||
}
|
}
|
||||||
|
Room selectedRoom;
|
||||||
|
if (_selectedRoomIds.length == 1) {
|
||||||
|
selectedRoom = Matrix.of(context)
|
||||||
|
.client
|
||||||
|
.getRoomById(_selectedRoomIds.single);
|
||||||
|
}
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
drawer:
|
drawer:
|
||||||
selectMode != SelectMode.normal ? null : DefaultDrawer(),
|
selectMode != SelectMode.normal ? null : DefaultDrawer(),
|
||||||
@ -234,18 +240,23 @@ class _ChatListState extends State<ChatList> {
|
|||||||
if (_selectedRoomIds.length == 1)
|
if (_selectedRoomIds.length == 1)
|
||||||
IconButton(
|
IconButton(
|
||||||
tooltip: L10n.of(context).toggleUnread,
|
tooltip: L10n.of(context).toggleUnread,
|
||||||
icon: Icon(Icons.mark_chat_unread_outlined),
|
icon: Icon(selectedRoom.isUnread
|
||||||
|
? Icons.mark_chat_read_outlined
|
||||||
|
: Icons.mark_chat_unread_outlined),
|
||||||
onPressed: () => _toggleUnread(context),
|
onPressed: () => _toggleUnread(context),
|
||||||
),
|
),
|
||||||
if (_selectedRoomIds.length == 1)
|
if (_selectedRoomIds.length == 1)
|
||||||
IconButton(
|
IconButton(
|
||||||
tooltip: L10n.of(context).toggleFavorite,
|
tooltip: L10n.of(context).toggleFavorite,
|
||||||
icon: Icon(Icons.favorite_border_outlined),
|
icon: Icon(Icons.push_pin_outlined),
|
||||||
onPressed: () => _toggleFavouriteRoom(context),
|
onPressed: () => _toggleFavouriteRoom(context),
|
||||||
),
|
),
|
||||||
if (_selectedRoomIds.length == 1)
|
if (_selectedRoomIds.length == 1)
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.notifications_none_outlined),
|
icon: Icon(selectedRoom.pushRuleState ==
|
||||||
|
PushRuleState.notify
|
||||||
|
? Icons.notifications_off_outlined
|
||||||
|
: Icons.notifications_outlined),
|
||||||
tooltip: L10n.of(context).toggleMuted,
|
tooltip: L10n.of(context).toggleMuted,
|
||||||
onPressed: () => _toggleMuted(context),
|
onPressed: () => _toggleMuted(context),
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user