fix key selection in RemoteSelectIdentityKeyActivity
This commit is contained in:
parent
a4b1751da4
commit
fb283c03f3
|
@ -112,8 +112,7 @@ class RemoteSelectIdentityKeyPresenter {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void goToSelectLayout() {
|
private void goToSelectLayout() {
|
||||||
List<UnifiedKeyInfo> filteredKeyInfoData = viewModel.isListAllKeys() || TextUtils.isEmpty(userId.email) ?
|
List<UnifiedKeyInfo> filteredKeyInfoData = getFilteredKeyInfo(userId.email);
|
||||||
keyInfoData : getFilteredKeyInfo(userId.email.toLowerCase().trim());
|
|
||||||
|
|
||||||
if (filteredKeyInfoData == null) {
|
if (filteredKeyInfoData == null) {
|
||||||
view.showLayoutEmpty();
|
view.showLayoutEmpty();
|
||||||
|
@ -126,6 +125,10 @@ class RemoteSelectIdentityKeyPresenter {
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<UnifiedKeyInfo> getFilteredKeyInfo(String filterString) {
|
private List<UnifiedKeyInfo> getFilteredKeyInfo(String filterString) {
|
||||||
|
if (viewModel.isListAllKeys() || TextUtils.isEmpty(filterString)) {
|
||||||
|
return keyInfoData;
|
||||||
|
}
|
||||||
|
filterString = filterString.toLowerCase().trim();
|
||||||
if (viewModel.filteredKeyInfo == null) {
|
if (viewModel.filteredKeyInfo == null) {
|
||||||
viewModel.filteredKeyInfo = new ArrayList<>();
|
viewModel.filteredKeyInfo = new ArrayList<>();
|
||||||
for (UnifiedKeyInfo unifiedKeyInfo : keyInfoData) {
|
for (UnifiedKeyInfo unifiedKeyInfo : keyInfoData) {
|
||||||
|
|
Loading…
Reference in a new issue