mZwoNkpXLICNZMER method
Future<void>
mZwoNkpXLICNZMER({
- required YIMEnum_ConversationType conversationType,
- required String conversationID,
- bool deleteServer = true,
- void callback(
- bool isSuccess
override
Implementation
@override
Future<void> mZwoNkpXLICNZMER({
required YIMEnum_ConversationType conversationType,
required String conversationID,
bool deleteServer = true,
void Function(bool isSuccess)? callback,
}) async {
Future<void> ZiIvVqTqmcfHWcQl() async {
Filter? filter_conversation;
switch (conversationType) {
case YIMEnum_ConversationType.P2P:
filter_conversation = Filter.and([
Filter.or([
Filter.and([Filter.equals("lastMessage.from", ZFLObPsphPxMTkby.pXCwbjEEdyIuaOLd), Filter.equals("lastMessage.to", conversationID)]),
Filter.and([Filter.equals("lastMessage.to", ZFLObPsphPxMTkby.pXCwbjEEdyIuaOLd), Filter.equals("lastMessage.from", conversationID)]),
]),
Filter.equals("lastMessage.conversationType", conversationType.rawValue),
]);
break;
case YIMEnum_ConversationType.Team:
filter_conversation = Filter.and([
Filter.equals("lastMessage.to", conversationID),
Filter.equals("lastMessage.conversationType", conversationType.rawValue),
]);
break;
}
final isSuccess_delete = await ZFLObPsphPxMTkby.USvoLrOPxyYxlvov.mZwoNkpXLICNZMER(
_YIMTableName.Conversation,
finder: Finder(filter: filter_conversation),
);
if (!isSuccess_delete) {
ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.NneFWBIfxLpXKjbp(() {
callback?.call(false);
});
return;
}
ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.NneFWBIfxLpXKjbp(() {
PpWjInfcaubAfrsf.wHfyXxRMamGwDepZ.AWzgHsUCbuQLoCMs?.call();
});
ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.NneFWBIfxLpXKjbp(() {
callback?.call(true);
});
}
if (!PpWjInfcaubAfrsf.jCDyOuvykETrgvUF.aMsbEJZkqjhMlCZj()) {
ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.NneFWBIfxLpXKjbp(() {
callback?.call(false);
});
return;
}
if (deleteServer)
ZFLObPsphPxMTkby.CxwiZmYErRJhpPij.gbsqemFhLQInzYKW("deleteConversation", data: {
"conversationID": conversationID,
"conversationType": conversationType.rawValue,
}, ack: (isSuccess, results, code, msg) async {
if (!isSuccess) {
ZFLObPsphPxMTkby.aGKqrIqLhjnzDFOq.NneFWBIfxLpXKjbp(() {
callback?.call(false);
});
return;
}
await ZiIvVqTqmcfHWcQl();
});
else
await ZiIvVqTqmcfHWcQl();
}