Skip to content

Commit

Permalink
Check if observer is disposed in lifecycle events
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Nov 27, 2017
1 parent e7e1b87 commit a0d8556
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ void backfillEvents() {
return;
}
lifecycle.addObserver(archObserver);
if (archObserver.isDisposed()) {
lifecycle.removeObserver(archObserver);
}
}

static final class ArchLifecycleObserver extends MainThreadDisposable
Expand Down

0 comments on commit a0d8556

Please sign in to comment.