|
|
|
@ -232,6 +232,9 @@ class _IMPage extends State<IMPage> implements OnChatMessage {
|
|
|
|
|
|
|
|
|
|
///批量查询用户信息 |
|
|
|
|
queryMemberInfo(List<String> mids) async { |
|
|
|
|
if (mids.isEmpty) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
BaseData<List<ImUserList>> baseData = await apiService.memberInfoByIds({ |
|
|
|
|
"mids": mids, |
|
|
|
|
}).catchError((error) { |
|
|
|
@ -239,17 +242,19 @@ class _IMPage extends State<IMPage> implements OnChatMessage {
|
|
|
|
|
alignment: Alignment.center); |
|
|
|
|
}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
baseData.data.forEach((element) async { |
|
|
|
|
await hxDatabase.insertOrUpdateImUser(element.toJson()); |
|
|
|
|
}); |
|
|
|
|
contactMap = baseData.data.lGroupBy((p0) => p0.mid).mGroupItem; |
|
|
|
|
setState(() {}); |
|
|
|
|
if (baseData.data.isNotEmpty) { |
|
|
|
|
baseData.data.forEach((element) async { |
|
|
|
|
await hxDatabase.insertOrUpdateImUser(element.toJson()); |
|
|
|
|
}); |
|
|
|
|
contactMap = baseData.data.lGroupBy((p0) => p0.mid).mGroupItem; |
|
|
|
|
setState(() {}); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RefreshController _refreshController = RefreshController(); |
|
|
|
|
final RefreshController _refreshController = RefreshController(); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|