Kaynağa Gözat

rollback hide status NOT FOUND in ProblemDocumentAdapter when no available status NON-AKTIF or AKTIF

lukirokudaime 1 yıl önce
ebeveyn
işleme
fcda1a9985

+ 1 - 17
app/src/main/java/com/fusi24/entryPermitScanner/adapter/ProblemDocumentAdapter.java

@@ -32,14 +32,6 @@ public class ProblemDocumentAdapter extends RecyclerView.Adapter<ProblemDocument
32
         this.problemsListFiltered = problemsList;
32
         this.problemsListFiltered = problemsList;
33
     }
33
     }
34
 
34
 
35
-    public void setVisibility(Boolean visibility) {
36
-        if (visibility != null){
37
-            isVisibility = visibility;
38
-        }else {
39
-            isVisibility = false;
40
-        }
41
-    }
42
-
43
     static class ViewHolder extends RecyclerView.ViewHolder {
35
     static class ViewHolder extends RecyclerView.ViewHolder {
44
         private RowDocumentBinding binding;
36
         private RowDocumentBinding binding;
45
 
37
 
@@ -63,15 +55,7 @@ public class ProblemDocumentAdapter extends RecyclerView.Adapter<ProblemDocument
63
         DataProblems problems = problemsListFiltered.get(position);
55
         DataProblems problems = problemsListFiltered.get(position);
64
 
56
 
65
         holder.binding.tvDocumentName.setText(problems.getDataDocumentType().getName());
57
         holder.binding.tvDocumentName.setText(problems.getDataDocumentType().getName());
66
-        if (isVisibility){
67
-            if (problems.getReason().equals("NOT FOUND")){
68
-                holder.binding.tvDocumentStatus.setVisibility(View.GONE);
69
-            }else {
70
-                holder.binding.tvDocumentStatus.setText(problems.getReason());
71
-            }
72
-        }else {
73
-            holder.binding.tvDocumentStatus.setText(problems.getReason());
74
-        }
58
+        holder.binding.tvDocumentStatus.setText(problems.getReason());
75
         if (problems.getExpiryDate() != null){
59
         if (problems.getExpiryDate() != null){
76
             holder.binding.tvDocumentDate.setText(DateHelper.convertStringToMyPattern(problems.getExpiryDate(), "yyyy-MM-dd", "dd MMM yyyy"));
60
             holder.binding.tvDocumentDate.setText(DateHelper.convertStringToMyPattern(problems.getExpiryDate(), "yyyy-MM-dd", "dd MMM yyyy"));
77
         } else {
61
         } else {

+ 0 - 5
app/src/main/java/com/fusi24/entryPermitScanner/adapter/ProblemGroupAdapter.java

@@ -78,11 +78,6 @@ public class ProblemGroupAdapter extends RecyclerView.Adapter<ProblemGroupAdapte
78
 
78
 
79
         //Create Sub Item View Adapter
79
         //Create Sub Item View Adapter
80
         ProblemDocumentAdapter documentAdapter = new ProblemDocumentAdapter(context, problemsList);
80
         ProblemDocumentAdapter documentAdapter = new ProblemDocumentAdapter(context, problemsList);
81
-        for (DataProblems dataProblems : problemsList){
82
-            if (!dataProblems.getReason().equals("NOT FOUND")){
83
-                documentAdapter.setVisibility(true);
84
-            }
85
-        }
86
         holder.binding.rvSubGroup.setLayoutManager(layoutManager);
81
         holder.binding.rvSubGroup.setLayoutManager(layoutManager);
87
         holder.binding.rvSubGroup.setAdapter(documentAdapter);
82
         holder.binding.rvSubGroup.setAdapter(documentAdapter);
88
         holder.binding.rvSubGroup.setRecycledViewPool(viewPool);
83
         holder.binding.rvSubGroup.setRecycledViewPool(viewPool);