The Installation docs for the JavaScript SyncManager
SDK are inaccurate. The example shows adding a connection handler which pauses and resumes syncing, calling pauseSync
/resumeSync
directly on the SendBirdSyncManager
class.
const handler = new sb.ConnectionHandler();
handler.onReconnectStarted = () => {
SendBirdSyncManager.pauseSync();
};
handler.onReconnectSucceeded = () => {
SendBirdSyncManager.resumeSync();
};
handler.onReconnectFailed = () => {
};
sb.addConnectionHandler(UNIQUE_HANDLER_ID, handler);
While it’s not explicitly stated that this is the class, the PascalCase of its name SendBirdSyncManager
and the example at the bottom of the page that calls its static getInstance()
method on it strongly suggests it is the class. However, the class does not have static pauseSync
or resumeSync
methods. One must first call getInstance()
and that is not documented in those examples (only tangentially at the bottom cache clearing example).
This is however made clear in the related Android example. Can you update your Javascript docs to include getInstance()
for connection handling?