Commit fcba0ad4 authored by Eugene Shapovalov's avatar Eugene Shapovalov 💬

Resolve discussion comments.

parent 1db9409c
......@@ -384,7 +384,7 @@ interface GitlabApi {
@HEAD("$API_PATH/issues")
fun getMyAssignedIssueHeaders(
@Query("assignee_id") assigneeId: Int,
@Query("scope") scope: IssueScope = IssueScope.ASSIGNED_BY_ME,
@Query("state") state: IssueState = IssueState.OPENED,
@Query("per_page") pageSize: Int = 1
): Single<Result<Unit>>
......
......@@ -211,16 +211,8 @@ class IssueRepository @Inject constructor(
.observeOn(schedulers.ui())
fun getMyAssignedIssueCount(): Single<Int> =
Single
.defer {
val currentUserAccount = sessionRepository.getCurrentUserAccount()
if (currentUserAccount != null) {
api.getMyAssignedIssueHeaders(currentUserAccount.userId.toInt())
.map { it.getXTotalHeader() }
} else {
Single.just(0)
}
}
api.getMyAssignedIssueHeaders()
.map { it.getXTotalHeader() }
.subscribeOn(schedulers.io())
.observeOn(schedulers.ui())
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment