Skip to content

Commit

Permalink
NClientV2 2.9.5
Browse files Browse the repository at this point in the history
* Bug fixes
  • Loading branch information
Dar9586 committed Jun 5, 2022
1 parent 4a17788 commit fb021ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/dar/nclientv2/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private void loadStringLogin() {

private void hideError() {
//errorText.setVisibility(View.GONE);
if (snackbar != null && snackbar.isShown()) snackbar.dismiss();
if (snackbar != null && snackbar.isShown()) runOnUiThread(() -> snackbar.dismiss());
snackbar = null;
}

Expand Down
14 changes: 12 additions & 2 deletions app/src/main/java/com/dar/nclientv2/adapters/ListAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@ public class ListAdapter extends RecyclerView.Adapter<GenericAdapter.ViewHolder>

public ListAdapter(BaseActivity cont) {
this.context = cont;
this.mDataset = new ArrayList<>();
this.mDataset = new ArrayList<SimpleGallery>(){
@Override
public SimpleGallery get(int index) {
try {
return super.get(index);
}catch (ArrayIndexOutOfBoundsException ignore){
return null;
}
}
};
storagePermission = Global.hasStoragePermission(context);
queryString = TagV2.getAvoidedTags();
}
Expand Down Expand Up @@ -128,7 +137,8 @@ public void updateColor(int id) {
int position = -1;
statuses.put(id, Queries.StatusMangaTable.getStatus(id).color);
for (int i = 0; i < mDataset.size(); i++) {
if (mDataset.get(i) != null && mDataset.get(i).getId() == id) {
SimpleGallery gallery= mDataset.get(i);
if (gallery != null && gallery.getId() == id) {
position = id;
break;
}
Expand Down

0 comments on commit fb021ea

Please sign in to comment.