[2.13.0_update]已处理的录包消息需清除

This commit is contained in:
chenfufeng
2022-11-29 10:52:01 +08:00
parent b5293a9775
commit 5a9708581c
4 changed files with 8 additions and 28 deletions

View File

@@ -130,15 +130,7 @@ object DataManager {
}
fun removeRecordInfo(key: String, value: Any) {
if (Thread.currentThread() == Looper.getMainLooper().thread) {
scope.launch {
withContext(Dispatchers.Default) {
removedRecordMap[key] = value
}
}
} else {
removedRecordMap[key] = value
}
removedRecordMap[key] = value
}
/**

View File

@@ -42,11 +42,8 @@ class MsgBoxProvider : IMsgBoxProvider {
return DataManager.getRecordBagData()
}
override fun removeRecordInfo(key: String, value: Any) {
return DataManager.removeRecordInfo(key, value)
}
override fun deleteBoxBean(context: Context, msgBoxBean: MsgBoxBean) {
override fun removeRecordInfo(context: Context, msgBoxBean: MsgBoxBean, key: String) {
DataManager.removeRecordInfo(key, key)
DataManager.delMsgBoxBean(context, msgBoxBean)
}

View File

@@ -21,9 +21,7 @@ interface IMsgBoxProvider: IMoGoFunctionServerProvider {
*/
fun getCachedRecordBagData(): List<MsgBoxBean>
fun removeRecordInfo(key: String, value: Any)
fun deleteBoxBean(context: Context, msgBoxBean: MsgBoxBean)
fun removeRecordInfo(context: Context, msgBoxBean: MsgBoxBean, key: String)
fun getDismissTime(): Long
}

View File

@@ -45,18 +45,11 @@ object CallerMsgBoxManager {
}
/**
* 用户已处理的Bag包需要删除
* key: Bag包的唯一标识keyvalue:任意非空的值
* 用户已处理的Bag包需要删除(上传或取消都包含)
* key: Bag包的唯一标识key, msgBoxBean: UI展示的那个对象而不是重新new的
*/
fun removeRecordInfo(key: String, value: Any) {
providerApi?.removeRecordInfo(key, value)
}
/**
* 删除消息盒子中存入数据库的数据比如已经处理的录制bag信息
*/
fun deleteBoxBean(context: Context, msgBoxBean: MsgBoxBean) {
providerApi?.deleteBoxBean(context, msgBoxBean)
fun removeRecordInfo(context: Context, msgBoxBean: MsgBoxBean, key: String) {
providerApi?.removeRecordInfo(context, msgBoxBean, key)
}
fun getDismissTime(): Long {