mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 09:12:09 +10:00
fix the sorting for favorites
This commit is contained in:
@@ -81,8 +81,13 @@ public class Favorite implements Serializable, Comparable<Favorite> {
|
|||||||
Component, Block
|
Component, Block
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String toDisplay() {
|
||||||
|
String[] parts = name.split("\\.");
|
||||||
|
return parts[parts.length - 1];
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(Favorite o) {
|
public int compareTo(Favorite o) {
|
||||||
return name.compareToIgnoreCase(o.getName());
|
return toDisplay().compareToIgnoreCase(o.toDisplay());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user