updated project style guidelines
This commit is contained in:
@ -40,7 +40,7 @@ class _ChatTileState extends State<ChatTile> {
|
||||
username = value.getString('username')!
|
||||
});
|
||||
|
||||
bool isGroup = widget.data.type != GetRoomResponseObjectConversationType.oneToOne;
|
||||
var isGroup = widget.data.type != GetRoomResponseObjectConversationType.oneToOne;
|
||||
circleAvatar = UserAvatar(id: isGroup ? widget.data.token : widget.data.name, isGroup: isGroup);
|
||||
}
|
||||
|
||||
@ -56,10 +56,7 @@ class _ChatTileState extends State<ChatTile> {
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Consumer<ChatProps>(builder: (context, chatData, child) {
|
||||
return ListTile(
|
||||
Widget build(BuildContext context) => Consumer<ChatProps>(builder: (context, chatData, child) => ListTile(
|
||||
style: ListTileStyle.list,
|
||||
tileColor: chatData.currentToken() == widget.data.token && TalkNavigator.isSecondaryVisible(context)
|
||||
? Theme.of(context).primaryColor.withAlpha(100)
|
||||
@ -120,7 +117,7 @@ class _ChatTileState extends State<ChatTile> {
|
||||
),
|
||||
onTap: () async {
|
||||
setCurrentAsRead();
|
||||
ChatView view = ChatView(room: widget.data, selfId: username, avatar: circleAvatar);
|
||||
var view = ChatView(room: widget.data, selfId: username, avatar: circleAvatar);
|
||||
TalkNavigator.pushSplitView(context, view, overrideToSingleSubScreen: true);
|
||||
Provider.of<ChatProps>(context, listen: false).setQueryToken(widget.data.token);
|
||||
},
|
||||
@ -185,7 +182,5 @@ class _ChatTileState extends State<ChatTile> {
|
||||
],
|
||||
));
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
));
|
||||
}
|
||||
|
Reference in New Issue
Block a user