fix page increment on failed response

This commit is contained in:
Ivan Smolin 2018-03-29 18:19:07 +03:00
parent f62325ad23
commit 3513f79db7
1 changed files with 5 additions and 5 deletions

View File

@ -16,11 +16,11 @@ final class {{ module_info.name }}CursorConfiguration: TotalCountCursorConfigura
}
func resultSingle() -> Single<ResultType> {
defer {
page += 1
}
return NetworkService.shared.listing(page: page)
return NetworkService.shared
.listing(page: page)
.do(onSuccess: { [weak self] _ in
self?.page += 1
})
}
}