Skip to content

Commit 38ca894

Browse files
committed
Ignore case when ordering split tunneling apps
1 parent ab77c7e commit 38ca894

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/SplitTunnelingViewModelState.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@ data class SplitTunnelingViewModelState(
2222
?.let { (excluded, included) ->
2323
SplitTunnelingUiState.ShowAppList(
2424
enabled = enabled,
25-
excludedApps = excluded.sortedBy { it.name },
25+
excludedApps = excluded.sort(),
2626
includedApps =
2727
if (showSystemApps) {
2828
included
2929
} else {
3030
included.filter { appData -> !appData.isSystemApp }
3131
}
32-
.sortedBy { it.name },
32+
.sort(),
3333
showSystemApps = showSystemApps
3434
)
3535
} ?: SplitTunnelingUiState.Loading(enabled = enabled)
3636
}
3737
}
38+
39+
private fun List<AppData>.sort() = sortedBy { it.name.lowercase() }

0 commit comments

Comments
 (0)