Fix / Bad ordering of active sessions

This commit is contained in:
Valere 2020-02-21 18:32:58 +01:00 committed by Benoit Marty
parent bdb1df75d4
commit cbd7c1aa63

View file

@ -33,7 +33,5 @@ fun CryptoDeviceInfo.getFingerprintHumanReadable() = fingerprint()
* ========================================================================================== */
fun List<DeviceInfo>.sortByLastSeen(): List<DeviceInfo> {
val list = toMutableList()
list.sortWith(DatedObjectComparators.descComparator)
return list
return this.sortedByDescending { it.lastSeenTs ?: 0 }
}