mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
Sort devices by alias, if available
This commit is contained in:
@@ -168,7 +168,7 @@ public class DeviceManager {
|
||||
@Override
|
||||
public int compare(GBDevice lhs, GBDevice rhs) {
|
||||
if (rhs.getStateOrdinal() - lhs.getStateOrdinal() == 0) {
|
||||
return Collator.getInstance().compare(lhs.getName(), rhs.getName());
|
||||
return Collator.getInstance().compare(lhs.getAliasOrName(), rhs.getAliasOrName());
|
||||
}
|
||||
return (rhs.getStateOrdinal() - lhs.getStateOrdinal());
|
||||
}
|
||||
|
Reference in New Issue
Block a user