Removed unnecessary filter to remote branches
This commit is contained in:
parent
0d14396ccf
commit
343da198b9
@ -68,16 +68,9 @@ class RemotesViewModel @AssistedInject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun loadRemotes(git: Git) = withContext(Dispatchers.IO) {
|
private suspend fun loadRemotes(git: Git) = withContext(Dispatchers.IO) {
|
||||||
val remotes = git.remoteList()
|
|
||||||
.call()
|
|
||||||
val allRemoteBranches = getRemoteBranchesUseCase(git)
|
val allRemoteBranches = getRemoteBranchesUseCase(git)
|
||||||
|
|
||||||
val remoteInfoList = remotes.map { remoteConfig ->
|
val remoteInfoList = getRemotesUseCase(git, allRemoteBranches)
|
||||||
val remoteBranches = allRemoteBranches.filter { branch ->
|
|
||||||
branch.name.startsWith("refs/remotes/${remoteConfig.name}")
|
|
||||||
}
|
|
||||||
RemoteInfo(remoteConfig, remoteBranches)
|
|
||||||
}
|
|
||||||
|
|
||||||
val remoteViewList = remoteInfoList.map { remoteInfo ->
|
val remoteViewList = remoteInfoList.map { remoteInfo ->
|
||||||
RemoteView(remoteInfo, true)
|
RemoteView(remoteInfo, true)
|
||||||
|
Loading…
Reference in New Issue
Block a user