|
|
|
@ -102,7 +102,7 @@ class _IMPage extends State<IMPage> implements OnChatMessage {
|
|
|
|
|
listenerRefresh(Message message) async { |
|
|
|
|
await sortConversation(lastMessageMap); |
|
|
|
|
|
|
|
|
|
await queryUnreadCount(conversationId); |
|
|
|
|
await queryUnreadCount(conversationIds); |
|
|
|
|
|
|
|
|
|
debugPrint("messages_records : ${message.toJson()}"); |
|
|
|
|
if (contactMap[message.fromId] == null) { |
|
|
|
@ -134,14 +134,11 @@ class _IMPage extends State<IMPage> implements OnChatMessage {
|
|
|
|
|
.map((e) => e.conversationId) |
|
|
|
|
.toSet() |
|
|
|
|
.toList(); |
|
|
|
|
conversationIds.forEach((element) { |
|
|
|
|
debugPrint("conversationIds: ${element}"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// update conversation unreadcount |
|
|
|
|
queryUnreadCount(conversationId) async { |
|
|
|
|
unreadCountMap = await hxDatabase.messageUnreadCount(conversationId); |
|
|
|
|
queryUnreadCount(conversationIds) async { |
|
|
|
|
unreadCountMap = await hxDatabase.messageUnreadCount(conversationIds); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// update imuser info by mids |
|
|
|
@ -366,7 +363,6 @@ class _IMPage extends State<IMPage> implements OnChatMessage {
|
|
|
|
|
shrinkWrap: true, |
|
|
|
|
physics: NeverScrollableScrollPhysics(), |
|
|
|
|
children: conversationIds.map((e) { |
|
|
|
|
debugPrint("---conversationIds: ${e}"); |
|
|
|
|
int position = conversationIds.indexOf(e); |
|
|
|
|
return ClipRRect( |
|
|
|
|
// borderRadius: BorderRadius.all(Radius.circular(4)), |
|
|
|
|