Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ class BrowserTrackersAnimatorHelper {
.asSequence()
.distinct()
.take(MAX_LOGOS_SHOWN + 1)
.sortedWithDisplayNamesStartingWithVowelsToTheEnd()
.map {
val resId = TrackersRenderer().networkLogoIcon(activity, it.name)
if (resId == null) {
Expand Down Expand Up @@ -417,6 +418,10 @@ class BrowserTrackersAnimatorHelper {
}
}

private fun Sequence<Entity>.sortedWithDisplayNamesStartingWithVowelsToTheEnd(): Sequence<Entity> {
return sortedWith(compareBy { "AEIOU".contains(it.displayName.take(1)) })
}

companion object {
private const val TRACKER_LOGOS_DELAY_ON_SCREEN = 2400L
private const val DEFAULT_ANIMATION_DURATION = 150L
Expand Down