修改系统通知未读数
This commit is contained in:
parent
ac526afef6
commit
483e78002c
@ -2,6 +2,7 @@ import 'package:circle_app/network/api.dart';
|
|||||||
import 'package:circle_app/network/dio_manager.dart';
|
import 'package:circle_app/network/dio_manager.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pull_to_refresh/pull_to_refresh.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 {
|
class Sys_notify_listLogic extends GetxController {
|
||||||
@override
|
@override
|
||||||
@ -21,6 +22,7 @@ class Sys_notify_listLogic extends GetxController {
|
|||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
makeRead();
|
||||||
initList();
|
initList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,6 +69,17 @@ class Sys_notify_listLogic extends GetxController {
|
|||||||
initList();
|
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 {
|
class Lists {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user