feat: sort servers alphabetically by id

we don't fetch user ordering yet
This commit is contained in:
Infi 2023-01-15 02:11:02 +01:00
parent 306d436ee1
commit b72def4d43
1 changed files with 41 additions and 39 deletions

View File

@ -115,7 +115,9 @@ fun ChatRouterScreen(topNav: NavController, viewModel: ChatRouterViewModel = vie
) )
} }
RevoltAPI.serverCache.values.forEach { server -> RevoltAPI.serverCache.values
.sortedBy { it.id }
.forEach { server ->
if (server.name == null) return@forEach if (server.name == null) return@forEach
if (server.icon != null) { if (server.icon != null) {