Преглед изворни кода

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

lukirokudaime пре 1 година
родитељ
комит
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 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 35
     static class ViewHolder extends RecyclerView.ViewHolder {
44 36
         private RowDocumentBinding binding;
45 37
 
@@ -63,15 +55,7 @@ public class ProblemDocumentAdapter extends RecyclerView.Adapter<ProblemDocument
63 55
         DataProblems problems = problemsListFiltered.get(position);
64 56
 
65 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 59
         if (problems.getExpiryDate() != null){
76 60
             holder.binding.tvDocumentDate.setText(DateHelper.convertStringToMyPattern(problems.getExpiryDate(), "yyyy-MM-dd", "dd MMM yyyy"));
77 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 79
         //Create Sub Item View Adapter
80 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 81
         holder.binding.rvSubGroup.setLayoutManager(layoutManager);
87 82
         holder.binding.rvSubGroup.setAdapter(documentAdapter);
88 83
         holder.binding.rvSubGroup.setRecycledViewPool(viewPool);