2 Commity 554c4309c4 ... 0862ee0d84

Autor SHA1 Wiadomość Data
  ilhamitubagoes 0862ee0d84 Memunculkan teks ketika data dokumen tidak valid di ProblemWorkingAdapter 2 lat temu
  ilhamitubagoes 241429a870 Menambahkan kondisi ketika ada data auto pass dihilangkan teksnya 2 lat temu

+ 5 - 2
app/src/main/java/com/fusi24/entryPermitScanner/adapter/ProblemWorkingAdapter.java

@@ -69,10 +69,13 @@ public class ProblemWorkingAdapter extends RecyclerView.Adapter<ProblemWorkingAd
69 69
         DataResultPermit permit = resultPermits.get(position);
70 70
         holder.binding.tvGroupName.setText(permit.getWorkingType().getName());
71 71
 
72
-        if (permit.getProblems().size() == 0){
72
+        /*if (permit.getProblems().size() == 0){
73 73
             holder.binding.tvMessage.setVisibility(View.VISIBLE);
74 74
             holder.binding.tvMessage.setText(permit.getMessage());
75
-        }
75
+        }*/
76
+
77
+        holder.binding.tvMessage.setVisibility(View.VISIBLE);
78
+        holder.binding.tvMessage.setText(permit.getMessage());
76 79
 
77 80
         groupList = Stream.of(permit.getProblems())
78 81
                 .map(v -> v.getDataDocumentType().getGroup())

+ 6 - 2
app/src/main/java/com/fusi24/entryPermitScanner/ui/scanresult/ScanResultActivity.java

@@ -273,8 +273,12 @@ public class ScanResultActivity extends BaseActivity implements ScanResultView {
273 273
         }
274 274
 
275 275
         if (dataWorkingPermit.getMessage() != null) {
276
-            binding.tvMessage.setVisibility(View.VISIBLE);
277
-            binding.tvMessage.setText(dataWorkingPermit.getMessage());
276
+            if (dataWorkingPermit.getMessage().contains("Auto Pass")){
277
+                binding.tvMessage.setVisibility(View.GONE);
278
+            } else {
279
+                binding.tvMessage.setVisibility(View.VISIBLE);
280
+                binding.tvMessage.setText(dataWorkingPermit.getMessage());
281
+            }
278 282
         } else {
279 283
             binding.tvMessage.setVisibility(View.GONE);
280 284
         }