ImportKeys: If there is only one key, expand its card automatically
This commit is contained in:
@@ -70,6 +70,11 @@ public class ImportKeysAdapter extends RecyclerView.Adapter<ImportKeysAdapter.Vi
|
|||||||
for (int i = 0; i < mKeyStates.length; i++) {
|
for (int i = 0; i < mKeyStates.length; i++) {
|
||||||
mKeyStates[i] = new KeyState();
|
mKeyStates[i] = new KeyState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If there is only one key, get it automatically
|
||||||
|
if (mData.size() == 1)
|
||||||
|
getKey(mData.get(0), true);
|
||||||
|
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +135,7 @@ public class ImportKeysAdapter extends RecyclerView.Adapter<ImportKeysAdapter.Vi
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
mCurrent = position;
|
mCurrent = position;
|
||||||
if (!showed && !downloaded) {
|
if (!downloaded) {
|
||||||
getKey(entry, true);
|
getKey(entry, true);
|
||||||
} else {
|
} else {
|
||||||
changeState(position, !showed);
|
changeState(position, !showed);
|
||||||
|
|||||||
Reference in New Issue
Block a user