react-native-mytatva-rn-sdk 1.2.83 → 1.2.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ import android.content.pm.PackageManager
9
9
  import android.graphics.Color
10
10
  import android.os.Bundle
11
11
  import android.util.Log
12
+ import android.util.TypedValue
12
13
  import android.view.Gravity
13
14
  import android.view.View
14
15
  import android.view.ViewGroup
@@ -144,6 +145,11 @@ class ConnectSensorActivity : BaseBleActivity() {
144
145
 
145
146
  Glide.with(this).asGif().load(R.drawable.warning).into(binding.ivGif)
146
147
 
148
+ // Restore original text size (24sp) for non-validation API errors
149
+ binding.tvFailTitle.setTextSize(TypedValue.COMPLEX_UNIT_SP, 24f)
150
+ binding.tvFailTitle.text = "Unable to detect sensor"
151
+ binding.tvFailTitle.setTextColor(Color.parseColor("#101828"))
152
+
147
153
  binding.btnSupport.tvProceed.text = "Contact Support"
148
154
  binding.btnRetry.tvProceed.text = "Retry"
149
155
 
@@ -428,6 +434,8 @@ class ConnectSensorActivity : BaseBleActivity() {
428
434
  // Replace "Unable to detect sensor" title with the error message in RED
429
435
  binding.tvFailTitle.text = message
430
436
  binding.tvFailTitle.setTextColor(Color.RED)
437
+ // Set text size to 16sp (same as iOS) for validation API error message
438
+ binding.tvFailTitle.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16f)
431
439
  binding.tvFailInstructions.visibility = View.GONE
432
440
  binding.tvReason.visibility = View.GONE
433
441
 
@@ -469,7 +469,8 @@ extension ConnectToSensorViewController: UITableViewDelegate, UITableViewDataSou
469
469
  case .error:
470
470
  switch enumFailureTableRow(rawValue: indexPath.row) {
471
471
  case .failAnimation:
472
- return 120
472
+ // Reduced height for validation API error, normal for other errors
473
+ return (deviceVerificationErrorMessage != nil) ? 80 : 120
473
474
  case .image:
474
475
  return (UIScreen.main.bounds.width * 120 / 390) + 20
475
476
  default:
@@ -548,6 +549,17 @@ extension ConnectToSensorViewController: UITableViewDelegate, UITableViewDataSou
548
549
  let cell: ImageTVC = tableView.dequeueReusableCell(for: indexPath)
549
550
  cell.displayImageView.loadGif(named: "failure")
550
551
  cell.bottomConstraint.constant = 11
552
+ // Hide camera view to prevent it from overlapping error content (cell reuse)
553
+ cell.cameraView.isHidden = true
554
+ cell.displayImageView.isHidden = false
555
+ // Scale down only for validation API error (65% of original size)
556
+ if deviceVerificationErrorMessage != nil {
557
+ cell.displayImageView.contentMode = .scaleAspectFit
558
+ cell.displayImageView.clipsToBounds = true
559
+ cell.displayImageView.transform = CGAffineTransform(scaleX: 0.65, y: 0.65)
560
+ } else {
561
+ cell.displayImageView.transform = .identity
562
+ }
551
563
  return cell
552
564
  case .details:
553
565
  let cell: VerticalLabelsTVC = tableView.dequeueReusableCell(for: indexPath)
@@ -556,9 +568,15 @@ extension ConnectToSensorViewController: UITableViewDelegate, UITableViewDataSou
556
568
  if let verificationError = deviceVerificationErrorMessage {
557
569
  cell.label2.text = verificationError
558
570
  cell.label2.textColor = .red
571
+ // Use smaller font for validation API error message (default title is 32pt)
572
+ cell.label2.font = FontManager.font(ofSize: 16, weight: .medium)
573
+ cell.label2.numberOfLines = 0
559
574
  cell.label3.text = ""
560
575
  } else {
561
576
  cell.label2.text = "Unable to detect sensor"
577
+ // Restore default title font for normal error
578
+ cell.label2.font = FontManager.title
579
+ cell.label2.textColor = CustomColor.shared.primaryBlack
562
580
  cell.label3.text = "Make sure there is proper lighting in the room"
563
581
  }
564
582
  return cell
@@ -567,6 +585,9 @@ extension ConnectToSensorViewController: UITableViewDelegate, UITableViewDataSou
567
585
  cell.topConstraint.constant = 0
568
586
  cell.displayImageView.image = loadImage(named: "flip_the_reference")
569
587
  cell.displayImageView.contentMode = .scaleAspectFill
588
+ // Hide camera view to prevent it from overlapping error content (cell reuse)
589
+ cell.cameraView.isHidden = true
590
+ cell.displayImageView.isHidden = false
570
591
  return cell
571
592
  case .watchVideo:
572
593
  let cell: WatchVideoTVC = tableView.dequeueReusableCell(for: indexPath)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mytatva-rn-sdk",
3
- "version": "1.2.83",
3
+ "version": "1.2.84",
4
4
  "description": "a package to inject data into visit health pwa",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",