浏览代码

Menambahkan kondisi ketika ada data auto pass dihilangkan teksnya

ilhamitubagoes 2 年之前
父节点
当前提交
241429a870

+ 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
         }