Skip to content

Commit

Permalink
NClientV2 2.6.0
Browse files Browse the repository at this point in the history
* Bug fixes (findGalleryFolder was broken)
+ Load LocalGallery if not internet
  • Loading branch information
Dar9586 committed Sep 30, 2020
1 parent 4a7bf50 commit ffaba22
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions app/src/main/java/com/dar/nclientv2/adapters/ListAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.dar.nclientv2.api.SimpleGallery;
import com.dar.nclientv2.api.components.GenericGallery;
import com.dar.nclientv2.api.enums.Language;
import com.dar.nclientv2.api.local.LocalGallery;
import com.dar.nclientv2.async.database.Queries;
import com.dar.nclientv2.components.activities.BaseActivity;
import com.dar.nclientv2.settings.Global;
Expand Down Expand Up @@ -53,18 +52,10 @@ public GenericAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, i
return new GenericAdapter.ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.entry_layout, parent, false));
}
private void loadGallery(final GenericAdapter.ViewHolder holder, SimpleGallery ent){
boolean online=true;
if(context.isFinishing())return;
try {
if (storagePermission) {
File f = LocalGallery.getPage(Global.findGalleryFolder(context,ent.getId()), 1);
if (f != null) {
online = false;
ImageDownloadUtility.loadImage(context, f, holder.imgView);
}
}
if(Global.isDestroyed(context))return;
if (online) ImageDownloadUtility.loadImage(context, ent.getThumbnail(), holder.imgView);
ImageDownloadUtility.loadImage(context, ent.getThumbnail(), holder.imgView);
}catch (VerifyError ignore){}
}
@Override
Expand Down

0 comments on commit ffaba22

Please sign in to comment.