修改系统通知未读数

This commit is contained in:
CYH 2023-07-18 16:51:05 +08:00
parent ac526afef6
commit 483e78002c

View File

@ -2,6 +2,7 @@ import 'package:circle_app/network/api.dart';
import 'package:circle_app/network/dio_manager.dart';
import 'package:get/get.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
class Sys_notify_listLogic extends GetxController {
@override
@ -21,6 +22,7 @@ class Sys_notify_listLogic extends GetxController {
@override
void onInit() async {
super.onInit();
makeRead();
initList();
}
@ -67,6 +69,17 @@ class Sys_notify_listLogic extends GetxController {
initList();
}
void makeRead() async {
V2TimConversation con = Get.arguments;
V2TimCallback markC2CMessageAsReadRes = await TencentImSDKPlugin
.v2TIMManager
.getMessageManager()
.markC2CMessageAsRead(userID: con.userID!); // id
if (markC2CMessageAsReadRes.code == 0) {
//
}
}
}
class Lists {