setLocalClearedAt method
Pure-local counterpart to clearChat: sets the clear-chat cutoff
without also calling markRoomAsRead server-side. Used by
ChatRoomsController.delete (WhatsApp "Delete chat"), which — unlike
clearChat — must stay purely local and never fail on account of
connectivity (deleting a chat has no server-side counterpart at all).
No-op (never throws) when no local datasource is configured.
Implementation
@override
Future<ChatResult<void>> setLocalClearedAt(
String roomId,
DateTime clearedAt,
) async {
_clearedAt[roomId] = clearedAt;
return const ChatSuccess(null);
}