Skip to content

Commit

Permalink
Crash fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
grishka committed Jul 17, 2024
1 parent c2e4781 commit bae1c70
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions mastodon/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId "org.joinmastodon.android"
minSdk 23
targetSdk 34
versionCode 111
versionName "2.6.0"
versionCode 112
versionName "2.6.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public ImageLoaderRequest getImageRequest(int position, int image){

@Override
public int getItemViewType(int position){
return position==0 ? 1 : 2;
return position==0 ? -1 : -2;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@
import me.grishka.appkit.api.ErrorResponse;
import me.grishka.appkit.fragments.BaseRecyclerFragment;
import me.grishka.appkit.utils.BindableViewHolder;
import me.grishka.appkit.utils.MergeRecyclerAdapter;
import okhttp3.Call;
import okhttp3.Request;
import okhttp3.Response;

abstract class InstanceCatalogFragment extends BaseRecyclerFragment<CatalogInstance>{
protected RecyclerView.Adapter adapter;
protected MergeRecyclerAdapter mergeAdapter;
protected CatalogInstance chosenInstance;
protected Button nextButton;
protected EditText searchEdit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ public void onClick(){
boolean found=false;
for(int i=0;i<list.getChildCount();i++){
RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i));
if(holder instanceof InstanceViewHolder ivh && holder.getAbsoluteAdapterPosition()==mergeAdapter.getPositionForAdapter(adapter)+idx){
if(holder instanceof InstanceViewHolder ivh && holder.getAbsoluteAdapterPosition()==idx){
ivh.radioButton.setChecked(false);
found=true;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class InstanceChooserLoginFragment extends InstanceCatalogFragment{
private View headerView;
private boolean loadedAutocomplete;
private ImageButton clearBtn;
private MergeRecyclerAdapter mergeAdapter;

public InstanceChooserLoginFragment(){
super(R.layout.fragment_login, 10);
Expand Down

0 comments on commit bae1c70

Please sign in to comment.