downloadUserSettings method

Future<bool> downloadUserSettings()

Download settings from remote for CCR mode. First call starts the fetch; subsequent calls join it.

Implementation

Future<bool> downloadUserSettings() {
  if (_downloadCompleter != null) return _downloadCompleter!.future;
  _downloadCompleter = Completer<bool>();
  _doDownloadUserSettings().then(
    (result) => _downloadCompleter!.complete(result),
    onError: (e) => _downloadCompleter!.complete(false),
  );
  return _downloadCompleter!.future;
}