Skip to main content

Document Listener

SyncDocument is an interface that defines the callback function called when an event occurs.

Summary

Public methods
Unit
onDocumentChanged(document: SyncDocument, fromRemote: Boolean)

Handle when the data changes

Unit
onDocumentError(document: SyncDocument, e: SyncError)

Handle when a data synchronization error occurs


Public methods

onDocumentChanged()
fun onDocumentChanged(document: SyncDocument, fromRemote: Boolean)

This is called when data changes occur, including data of child nodes.

Parameters
SyncDocument

The SyncDocument object that the event occurred on

Boolean

Whether there was a remote change

onDocumentError()
fun onDocumentError(document: SyncDocument, e: SyncError)

This is called when data changes occur, including data of child nodes.

Parameters
SyncDocument

The SyncDocument object where the error occurred

SyncError

Detailed error description associated with SyncError