updated project style guidelines
This commit is contained in:
@ -40,19 +40,18 @@ class _ChatViewState extends State<ChatView> {
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Consumer<ChatProps>(
|
||||
Widget build(BuildContext context) => Consumer<ChatProps>(
|
||||
builder: (context, data, child) {
|
||||
List<Widget> messages = List<Widget>.empty(growable: true);
|
||||
var messages = List<Widget>.empty(growable: true);
|
||||
|
||||
if(!data.primaryLoading()) {
|
||||
|
||||
DateTime lastDate = DateTime.now();
|
||||
var lastDate = DateTime.now();
|
||||
data.getChatResponse.sortByTimestamp().forEach((element) {
|
||||
DateTime elementDate = DateTime.fromMillisecondsSinceEpoch(element.timestamp * 1000);
|
||||
var elementDate = DateTime.fromMillisecondsSinceEpoch(element.timestamp * 1000);
|
||||
|
||||
if(element.systemMessage.contains('reaction')) return;
|
||||
int commonRead = int.parse(data.getChatResponse.headers?['x-chat-last-common-read'] ?? '0');
|
||||
var commonRead = int.parse(data.getChatResponse.headers?['x-chat-last-common-read'] ?? '0');
|
||||
|
||||
if(!elementDate.isSameDay(lastDate)) {
|
||||
lastDate = elementDate;
|
||||
@ -140,5 +139,4 @@ class _ChatViewState extends State<ChatView> {
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user