diff options
author | mar-v-in <github@rvin.mooo.com> | 2014-06-05 00:59:39 +0200 |
---|---|---|
committer | mar-v-in <github@rvin.mooo.com> | 2014-06-05 00:59:39 +0200 |
commit | dc1e26f39c9c7fa88dd28d2920a2919f83e0575c (patch) | |
tree | bc7c87df1c67520198129da087e8c9a38320a7f4 /OpenKeychain | |
parent | cae0071342e746c934490298c3dd3ee230a2ee32 (diff) | |
download | open-keychain-dc1e26f39c9c7fa88dd28d2920a2919f83e0575c.tar.gz open-keychain-dc1e26f39c9c7fa88dd28d2920a2919f83e0575c.tar.bz2 open-keychain-dc1e26f39c9c7fa88dd28d2920a2919f83e0575c.zip |
Make keylist case insensitive
You want "michael" to be next to "Michael", don't you?
Diffstat (limited to 'OpenKeychain')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java index 9c90b5eb7..d5a753133 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java @@ -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; } |