vcs: cleanup - extract method

This commit is contained in:
Aleksey Pivovarov
2018-09-26 15:10:44 +03:00
parent efb3f3c7cf
commit b2f00eb92e
@@ -100,6 +100,10 @@ class RemoveChangeListAction : AnAction(), DumbAware {
return confirmActiveChangeListRemoval(project, lists)
}
return confirmChangeListRemoval(project, lists)
}
private fun confirmChangeListRemoval(project: Project, lists: List<LocalChangeList>): Boolean {
val haveNoChanges = lists.all { it.changes.isEmpty() }
if (haveNoChanges) return true