fullResync method

Future<void> fullResync()

Synchronizes pending local changes to the server does full synchronization from the server.

Implementation

Future<void> fullResync() async {
  _preventConcurrentSync();
  _updateState(state.start());
  try {
    final concluded = await uploadLocalChanges();
    if (!concluded) {
      // this means we weren't able to sync all local changes
      // due to an unavailable server
      return;
    }
    await _fullResync();
  } finally {
    _updateState(state.stop());
  }
}