group non-letters in "#" group, display keys with only an address in-order
This commit is contained in:
@@ -58,6 +58,15 @@ public class FlexibleKeyItemFactory {
|
||||
@NonNull
|
||||
private String getHeaderText(UnifiedKeyInfo unifiedKeyInfo) {
|
||||
String headerText = unifiedKeyInfo.name();
|
||||
return headerText == null || headerText.isEmpty() ? "" : headerText.substring(0, 1).toUpperCase();
|
||||
if (headerText == null || headerText.isEmpty()) {
|
||||
headerText = unifiedKeyInfo.email();
|
||||
}
|
||||
if (headerText == null || headerText.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
if (!Character.isLetter(headerText.codePointAt(0))) {
|
||||
return "#";
|
||||
}
|
||||
return headerText.substring(0, 1).toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ CREATE VIEW unifiedKeyView AS
|
||||
|
||||
selectAllUnifiedKeyInfo:
|
||||
SELECT * FROM unifiedKeyView
|
||||
ORDER BY has_any_secret_int DESC, name COLLATE NOCASE ASC, creation DESC;
|
||||
ORDER BY has_any_secret_int DESC, IFNULL(name, email) COLLATE NOCASE ASC, creation DESC;
|
||||
|
||||
selectUnifiedKeyInfoByMasterKeyId:
|
||||
SELECT * FROM unifiedKeyView
|
||||
|
||||
Reference in New Issue
Block a user