Show downloading folders

This commit is contained in:
M66B
2019-01-05 08:04:20 +00:00
parent 988973135d
commit a51fd94a68
2 changed files with 15 additions and 1 deletions

View File

@@ -73,6 +73,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
private ImageView ivUnified;
private TextView tvType;
private TextView tvAfter;
private ImageView ivDownload;
private ImageView ivSync;
private TextView tvKeywords;
private TextView tvError;
@@ -95,6 +96,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
ivUnified = itemView.findViewById(R.id.ivUnified);
tvType = itemView.findViewById(R.id.tvType);
tvAfter = itemView.findViewById(R.id.tvAfter);
ivDownload = itemView.findViewById(R.id.ivDownload);
ivSync = itemView.findViewById(R.id.ivSync);
tvKeywords = itemView.findViewById(R.id.tvKeywords);
tvError = itemView.findViewById(R.id.tvError);
@@ -174,8 +176,10 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
if (folder.account == null) {
tvAfter.setText(null);
ivDownload.setVisibility(View.GONE);
ivSync.setImageResource(R.drawable.baseline_sync_24);
} else {
ivDownload.setVisibility(folder.download ? View.VISIBLE : View.GONE);
if (folder.keep_days == Integer.MAX_VALUE)
tvAfter.setText(String.format("%d/∞", folder.sync_days));
else