mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs] Apply inclusion updates regardlessly of ChangesViewDelegatingInclusionModel.inclusionState state (IJPL-236745)
Previouys behavior - `inclusionState` can contain partially included changes, thus calling `addInclusion` won't trigger the update. See `ChangesViewDelegatingInclusionModel.getInclusionState`. (cherry picked from commit 8629a774a85540eba9243cc589a12408ea69ae82) IJ-CR-193723 GitOrigin-RevId: f83b9a9611557aa6bfc9a91405352c4789cabc54
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3718ef86c5
commit
9a7b79498f
+12
-15
@@ -79,21 +79,19 @@ internal class ChangesViewDelegatingInclusionModel(
|
||||
|
||||
override fun addInclusion(items: Collection<Any>) {
|
||||
LOG.trace { "Adding ${items.size} items to inclusion" }
|
||||
if (inclusionState.addAll(items)) {
|
||||
fireInclusionChanged()
|
||||
updateRequests.tryEmit {
|
||||
ChangesViewInclusionModelApi.getInstance().add(project.projectId(), items.toDto())
|
||||
}
|
||||
inclusionState.addAll(items)
|
||||
fireInclusionChanged()
|
||||
updateRequests.tryEmit {
|
||||
ChangesViewInclusionModelApi.getInstance().add(project.projectId(), items.toDto())
|
||||
}
|
||||
}
|
||||
|
||||
override fun removeInclusion(items: Collection<Any>) {
|
||||
LOG.trace { "Removing ${items.size} items from inclusion" }
|
||||
if (inclusionState.removeAll(items.toSet())) {
|
||||
fireInclusionChanged()
|
||||
updateRequests.tryEmit {
|
||||
ChangesViewInclusionModelApi.getInstance().remove(project.projectId(), items.toDto())
|
||||
}
|
||||
inclusionState.removeAll(items.toSet())
|
||||
fireInclusionChanged()
|
||||
updateRequests.tryEmit {
|
||||
ChangesViewInclusionModelApi.getInstance().remove(project.projectId(), items.toDto())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,11 +106,10 @@ internal class ChangesViewDelegatingInclusionModel(
|
||||
|
||||
override fun retainInclusion(items: Collection<Any>) {
|
||||
LOG.trace { "Retaining ${items.size} items in inclusion" }
|
||||
if (inclusionState.retainAll(items.toSet())) {
|
||||
fireInclusionChanged()
|
||||
updateRequests.tryEmit {
|
||||
ChangesViewInclusionModelApi.getInstance().retain(project.projectId(), items.toDto())
|
||||
}
|
||||
inclusionState.retainAll(items.toSet())
|
||||
fireInclusionChanged()
|
||||
updateRequests.tryEmit {
|
||||
ChangesViewInclusionModelApi.getInstance().retain(project.projectId(), items.toDto())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user