preselect key if only a single one is available

This commit is contained in:
Vincent Breitmoser committed 2018-07-04 13:59:21 +02:00
1 parent 19dfac7fc9
commit a02251274b
1 file changed
+4
@@ -101,6 +101,10 @@ public class KeySpinner extends AppCompatSpinner {
}
private void maybeSelectPreselection(List<UnifiedKeyInfo> keyInfos) {
if (spinnerAdapter.hasNoneItem() && keyInfos.size() == 1) {
setSelection(1);
return;
}
if (preSelectedKeyId == null) {
return;
}