mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-04 16:25:05 -05:00
Make keylist case insensitive
You want "michael" to be next to "Michael", don't you?
This commit is contained in:
parent
cae0071342
commit
dc1e26f39c
@ -253,7 +253,7 @@ public class KeyListFragment extends LoaderFragment
|
||||
static final int INDEX_HAS_ANY_SECRET = 6;
|
||||
|
||||
static final String ORDER =
|
||||
KeyRings.HAS_ANY_SECRET + " DESC, " + KeyRings.USER_ID + " ASC";
|
||||
KeyRings.HAS_ANY_SECRET + " DESC, UPPER(" + KeyRings.USER_ID + ") ASC";
|
||||
|
||||
|
||||
@Override
|
||||
@ -593,7 +593,7 @@ public class KeyListFragment extends LoaderFragment
|
||||
String userId = mCursor.getString(KeyListFragment.INDEX_USER_ID);
|
||||
String headerText = convertView.getResources().getString(R.string.user_id_no_name);
|
||||
if (userId != null && userId.length() > 0) {
|
||||
headerText = "" + userId.subSequence(0, 1).charAt(0);
|
||||
headerText = "" + userId.charAt(0);
|
||||
}
|
||||
holder.mText.setText(headerText);
|
||||
holder.mCount.setVisibility(View.GONE);
|
||||
@ -622,7 +622,7 @@ public class KeyListFragment extends LoaderFragment
|
||||
// otherwise, return the first character of the name as ID
|
||||
String userId = mCursor.getString(KeyListFragment.INDEX_USER_ID);
|
||||
if (userId != null && userId.length() > 0) {
|
||||
return userId.charAt(0);
|
||||
return Character.toUpperCase(userId.charAt(0));
|
||||
} else {
|
||||
return Long.MAX_VALUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user