Fix #443 again
This commit is contained in:
parent
e10faeefc4
commit
202a5f9581
|
@ -240,13 +240,17 @@ public class InstanceChooserLoginFragment extends InstanceCatalogFragment{
|
||||||
if(chosenInstance!=null){
|
if(chosenInstance!=null){
|
||||||
int idx=filteredData.indexOf(chosenInstance);
|
int idx=filteredData.indexOf(chosenInstance);
|
||||||
if(idx!=-1){
|
if(idx!=-1){
|
||||||
|
boolean found=false;
|
||||||
for(int i=0;i<list.getChildCount();i++){
|
for(int i=0;i<list.getChildCount();i++){
|
||||||
RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i));
|
RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i));
|
||||||
if(holder.getAbsoluteAdapterPosition()==mergeAdapter.getPositionForAdapter(adapter)+idx && holder instanceof InstanceViewHolder ivh){
|
if(holder.getAbsoluteAdapterPosition()==mergeAdapter.getPositionForAdapter(adapter)+idx && holder instanceof InstanceViewHolder ivh){
|
||||||
ivh.radioButton.setChecked(false);
|
ivh.radioButton.setChecked(false);
|
||||||
|
found=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!found)
|
||||||
|
adapter.notifyItemChanged(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
radioButton.setChecked(true);
|
radioButton.setChecked(true);
|
||||||
|
|
Loading…
Reference in New Issue