From 1bd586653a3ce44bcd73f81d6cfe7cf1d0f13c1f Mon Sep 17 00:00:00 2001 From: Dmitry Zhuravlev Date: Wed, 25 Dec 2019 17:10:37 +0300 Subject: [PATCH] git-branches-dashboard: fix calculating changed flag when branch unmarked from favorites GitOrigin-RevId: 305ba3ff926f1980d3b7b348dc84825db09b8da0 --- .../ui/branch/dashboard/BranchesDashboardController.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/git4idea/src/git4idea/ui/branch/dashboard/BranchesDashboardController.kt b/plugins/git4idea/src/git4idea/ui/branch/dashboard/BranchesDashboardController.kt index 9251ea8f10d3..47992a454a04 100644 --- a/plugins/git4idea/src/git4idea/ui/branch/dashboard/BranchesDashboardController.kt +++ b/plugins/git4idea/src/git4idea/ui/branch/dashboard/BranchesDashboardController.kt @@ -69,12 +69,12 @@ internal class BranchesDashboardController(private val project: Project, with(project.service()) { for (localBranch in localBranches) { val isFavorite = localBranch.repositories.any { isFavorite(GitBranchType.LOCAL, it, localBranch.branchName) } - changed = changed or isFavorite + changed = changed or (localBranch.isFavorite != isFavorite) localBranch.apply { this.isFavorite = isFavorite } } for (remoteBranch in remoteBranches) { val isFavorite = remoteBranch.repositories.any { isFavorite(GitBranchType.REMOTE, it, remoteBranch.branchName) } - changed = changed or isFavorite + changed = changed or (remoteBranch.isFavorite != isFavorite) remoteBranch.apply { this.isFavorite = isFavorite } } }