Skip to content

Commit 34265e1

Browse files
authored
android: fix severity sorting (#791)
The previous fix attempt resulted in comparing other.Severity to itself, which always returns 0. This compares the other item's severity to this item's severity. Updates tailscale/corp#41733 Signed-off-by: kari-ts <kari@tailscale.com>
1 parent 181808b commit 34265e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • android/src/main/java/com/tailscale/ipn/ui/model

android/src/main/java/com/tailscale/ipn/ui/model/Health.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Health {
3636

3737
override fun compareTo(other: UnhealthyState): Int {
3838
// Compare by severity first
39-
val severityComparison = other.Severity.compareTo(other.Severity)
39+
val severityComparison = other.Severity.compareTo(Severity)
4040
if (severityComparison != 0) {
4141
return severityComparison
4242
}

0 commit comments

Comments
 (0)