|
|
@ -124,7 +124,8 @@ class _ChatDetailsPage extends State<ChatDetailsPage> |
|
|
|
Future messageShowTime() async { |
|
|
|
Future messageShowTime() async { |
|
|
|
List<Message> messagePages = await hxDatabase.queryTList(conversation); |
|
|
|
List<Message> messagePages = await hxDatabase.queryTList(conversation); |
|
|
|
for (var value in messages) { |
|
|
|
for (var value in messages) { |
|
|
|
Message message = messagePages.firstWhere((element) => value.id == element.id, orElse: () => null); |
|
|
|
Message message = messagePages |
|
|
|
|
|
|
|
.firstWhere((element) => value.id == element.id, orElse: () => null); |
|
|
|
value.showTime = message != null; |
|
|
|
value.showTime = message != null; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -142,8 +143,10 @@ class _ChatDetailsPage extends State<ChatDetailsPage> |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (apiService == null) |
|
|
|
if (apiService == null) |
|
|
|
apiService = ApiService(Dio(), context: context, token: value.getString("token")); |
|
|
|
apiService = |
|
|
|
BaseData<UserInfo> baseData = await apiService.queryInfo().catchError((onError) {}); |
|
|
|
ApiService(Dio(), context: context, token: value.getString("token")); |
|
|
|
|
|
|
|
BaseData<UserInfo> baseData = |
|
|
|
|
|
|
|
await apiService.queryInfo().catchError((onError) {}); |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
userInfo = baseData.data; |
|
|
|
userInfo = baseData.data; |
|
|
@ -1215,8 +1218,7 @@ class _ChatDetailsPage extends State<ChatDetailsPage> |
|
|
|
) |
|
|
|
) |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
)); |
|
|
|
); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|