mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-13 11:17:33 +01:00
Sort devices by alias, if available
This commit is contained in:
parent
39ddb732f7
commit
91c317fda2
@ -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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user