-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
While ClientResync can be handled automatically by Realm now, it is still possible to enable an automatic mode where the user has to handle it automatically. In that case, it results in the user having to write a bunch of annoying code.
We should consider exposing a specific callback explicitly for that, which will also make it much easier to expose the correct information and types to users.
```
// Current API
SyncConfiguration config = user.createConfiguration(url)
.errorHandler((session, error) -> {
if (error.getErrorCode() == ErrorCode.CLIENT_RESET)
else
{ // Handle other errors }.build()
// Suggest API
SyncConfiguration config = user.createConfiguration(url)
.clientResyncMode(ClientResyncMode.MANUAL)
.errorHandler((session, error) ->
)
.clientResyncHandler((session, error) ->
)
.build()