Fix order of discovery page

This commit is contained in:
Harish Vishwakarma 2026-01-23 14:51:38 +05:30
parent b8c6ff8531
commit c65322fbf7
1 changed files with 4 additions and 2 deletions

View File

@ -29,10 +29,11 @@ class ServerDataRepository {
"false" -> false
else -> true
},
showColor = rowData["showcolor"]
showColor = rowData["showcolor"],
sortOrder = rowData["sortorder"]?.toIntOrNull()
)
}
emit(servers)
emit(servers.sortedBy { it.sortOrder ?: Int.MAX_VALUE })
}.flowOn(Dispatchers.IO)
}
@ -48,4 +49,5 @@ data class ServerData(
val inviteCode: String,
val disabled: Boolean,
val showColor: String?,
val sortOrder: Int? = null,
)