Skip to content

Commit

Permalink
Merge pull request #1577 from akevalion/dev-2.0
Browse files Browse the repository at this point in the history
This pull request add a sorting block
  • Loading branch information
tesonep authored Mar 25, 2022
2 parents bc910fc + 7070a0e commit 61b5344
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Iceberg-TipUI/IceTipRepositoriesBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ IceTipRepositoriesBrowser >> openManagePackagesWindow [

{ #category : #private }
IceTipRepositoriesBrowser >> refresh [

repositoryList items: self model repositories
repositoryList items: self sortedRepositories
]

{ #category : #accessing }
Expand All @@ -188,6 +187,19 @@ IceTipRepositoriesBrowser >> repositoryModels [

]

{ #category : #private }
IceTipRepositoriesBrowser >> sortedRepositories [
^ self model repositories
sorted: [ :a :b |
| status1 status2 |
status1 := a entity isMissing asInteger.
status2 := b entity isMissing asInteger.
status1 = status2
ifTrue: [ a name < b name ]
ifFalse: [ status1 < status2 ]
]
]

{ #category : #initialization }
IceTipRepositoriesBrowser >> subscribeToAnnouncements [

Expand Down

0 comments on commit 61b5344

Please sign in to comment.