Small optimizations for display of package icons in key list
This commit is contained in:
parent
ebe262015a
commit
31b23d2085
|
@ -366,7 +366,7 @@ public class KeychainProvider extends ContentProvider {
|
|||
"(" + Tables.KEYS + "." + Keys.EXPIRY + " IS NOT NULL AND " + Tables.KEYS + "." + Keys.EXPIRY
|
||||
+ " < " + new Date().getTime() / 1000 + ") AS " + KeyRings.IS_EXPIRED);
|
||||
projectionMap.put(KeyRings.API_KNOWN_TO_PACKAGE_NAMES,
|
||||
"GROUP_CONCAT(aTI." + ApiAutocryptPeer.PACKAGE_NAME + ") AS "
|
||||
"GROUP_CONCAT(DISTINCT aTI." + ApiAutocryptPeer.PACKAGE_NAME + ") AS "
|
||||
+ KeyRings.API_KNOWN_TO_PACKAGE_NAMES);
|
||||
qb.setProjectionMap(projectionMap);
|
||||
|
||||
|
|
|
@ -494,7 +494,7 @@ public class KeySectionedListAdapter extends SectionCursorAdapter<KeySectionedLi
|
|||
}
|
||||
|
||||
{ // set icons
|
||||
List<String> packageNames = keyItem.getTrustIdPackages();
|
||||
List<String> packageNames = keyItem.getAutocryptPeerIdPackages();
|
||||
|
||||
if (!keyItem.isSecret() && !packageNames.isEmpty()) {
|
||||
String packageName = packageNames.get(0);
|
||||
|
@ -627,7 +627,7 @@ public class KeySectionedListAdapter extends SectionCursorAdapter<KeySectionedLi
|
|||
return getInt(index) > 0;
|
||||
}
|
||||
|
||||
public List<String> getTrustIdPackages() {
|
||||
public List<String> getAutocryptPeerIdPackages() {
|
||||
int index = getColumnIndexOrThrow(KeyRings.API_KNOWN_TO_PACKAGE_NAMES);
|
||||
String packageNames = getString(index);
|
||||
if (packageNames == null) {
|
||||
|
|
|
@ -392,8 +392,7 @@ public abstract class CursorAdapter<C extends SimpleCursor, VH extends RecyclerV
|
|||
KeychainContract.KeyRings.CREATION,
|
||||
KeychainContract.KeyRings.NAME,
|
||||
KeychainContract.KeyRings.EMAIL,
|
||||
KeychainContract.KeyRings.COMMENT,
|
||||
KeychainContract.KeyRings.API_KNOWN_TO_PACKAGE_NAMES
|
||||
KeychainContract.KeyRings.COMMENT
|
||||
));
|
||||
|
||||
PROJECTION = arr.toArray(new String[arr.size()]);
|
||||
|
|
Loading…
Reference in a new issue