Skip to content

Commit

Permalink
Don't need RxJava to call transitionToLocalOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcreaser committed Jun 11, 2024
1 parent 6f945fc commit 72f10e4
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,11 @@ private void onApiSyncFailure(Throwable exception) {
return;
}
LOG.warn("API sync failed - transitioning to LOCAL_ONLY.", exception);
Disposable subscription = Completable.fromAction(this::transitionToLocalOnly)
.subscribe(
() -> { /* no-op */ },
error -> LOG.warn("Transition to LOCAL_ONLY failed.", error)
);
disposables.add(subscription);
try {
transitionToLocalOnly();
} catch (Exception error) {
LOG.warn("Transition to LOCAL_ONLY failed.", error);
}
}

private void disposeNetworkChanges() {
Expand Down

0 comments on commit 72f10e4

Please sign in to comment.