markAsReadDeleteUnreadSeparator static method
This method is used to mark all messages as read up to the most recent message received in a chat identified by jid.
It also removes the unread message separator that visually distinguishes unread messages from read messages in the chat interface.
Parameters:
jid - The JID (Jabber ID) of the chat for which messages should be marked as read and the unread separator deleted.
Returns:
A Future<bool?> that completes with true if the operation was successful,
false if unsuccessful, or null if an error occurred during the operation.
Example usage:
bool? isSuccess = await Mirrorfly.markAsReadDeleteUnreadSeparator(jid: "user123@example.com");
if (isSuccess == true) {
print("Messages marked as read and unread separator deleted successfully");
} else {
print("Failed to mark messages as read or delete unread separator");
}
Implementation
static Future<bool?> markAsReadDeleteUnreadSeparator({required String jid}) {
return FlyChatFlutterPlatform.instance.markAsReadDeleteUnreadSeparator(jid);
}