diff --git a/plugins/gitlab/gitlab-core/src/org/jetbrains/plugins/gitlab/mergerequest/ui/create/model/GitLabMergeRequestCreateViewModel.kt b/plugins/gitlab/gitlab-core/src/org/jetbrains/plugins/gitlab/mergerequest/ui/create/model/GitLabMergeRequestCreateViewModel.kt index 602211d328cc..b0fd59e93b33 100644 --- a/plugins/gitlab/gitlab-core/src/org/jetbrains/plugins/gitlab/mergerequest/ui/create/model/GitLabMergeRequestCreateViewModel.kt +++ b/plugins/gitlab/gitlab-core/src/org/jetbrains/plugins/gitlab/mergerequest/ui/create/model/GitLabMergeRequestCreateViewModel.kt @@ -197,13 +197,13 @@ internal class GitLabMergeRequestCreateViewModelImpl( } cs.launch { - combine(commits, branchState) { commitsResult, branchState -> + combineAndCollect(commits, branchState) { commitsResult, branchState -> val commits = commitsResult?.getOrNull() if (commits != null && commits.size == 1 && titleText.value.isEmpty()) { - setTitle(commits.first().subject.lines().firstOrNull() ?: return@combine) + setTitle(commits.first().subject.lines().firstOrNull() ?: return@combineAndCollect) } else if (titleText.value.isEmpty()) { - setTitle(when (val branch = branchState?.headBranch ?: return@combine) { + setTitle(when (val branch = branchState?.headBranch ?: return@combineAndCollect) { is GitRemoteBranch -> branch.nameForRemoteOperations else -> branch.name })