コード例 #1
0
 public void loadAllTeams() {
   mRxAllTeamsCacheHelper.cache(
       mDataManager
           .getAllTeams()
           .flatMap(HttpStatus::requireOk)
           .compose(RxUtil.applyIoSchedulers()));
   continueCachedAllTeamsRequest();
 }
コード例 #2
0
 public void loadTeam(int teamNumber) {
   getMvpView().clearCurrentTeamLocations();
   mRxTeamLocationsCacheHelper.cache(
       mDataManager
           .getTeamLocationRecordsFromServer(teamNumber)
           .flatMap(
               listResponse ->
                   listResponse.code() == HttpStatus.NOT_FOUND
                       ? Observable.error(new TeamNotFoundException(listResponse))
                       : Observable.just(listResponse))
           .flatMap(HttpStatus::requireOk)
           .compose(RxUtil.applyIoSchedulers()));
   continueCachedTeamLocationsRequest();
 }