@@ -306,7 +306,7 @@ class RealSessionController @Inject constructor(
306306 _state .update { it.copy(isCameraPermissionGranted = result == PermissionResult .Granted ) }
307307 }
308308
309- override fun showBill (bill : Bill , vibrate : Boolean ) {
309+ override fun showBill (bill : Bill ) {
310310 if (bill.amount.converted.doubleValue == 0.0 ) return
311311 val owner = userManager.accountCluster ? : return
312312
@@ -350,7 +350,7 @@ class RealSessionController @Inject constructor(
350350 message = " Cash link not sent. Restarting awaiting grab" ,
351351 type = TraceType .User ,
352352 )
353- awaitBillGrab(bill, owner, vibrate )
353+ awaitBillGrab(bill, owner)
354354 }
355355 }
356356 ),
@@ -361,14 +361,14 @@ class RealSessionController @Inject constructor(
361361 )
362362 }
363363 }
364- awaitBillGrab(bill, owner, vibrate )
364+ awaitBillGrab(bill, owner)
365365 }
366366 }
367367 }
368368 }
369369 }
370370
371- private fun awaitBillGrab (bill : Bill , owner : AccountCluster , vibrate : Boolean ) {
371+ private fun awaitBillGrab (bill : Bill , owner : AccountCluster ) {
372372 billController.awaitGrab(
373373 amount = bill.amount,
374374 owner = owner,
@@ -407,7 +407,7 @@ class RealSessionController @Inject constructor(
407407 type = TraceType .User ,
408408 )
409409 }
410- presentBillToUser(data, bill, vibrate )
410+ presentBillToUser(data, bill)
411411 },
412412 )
413413 }
@@ -612,7 +612,6 @@ class RealSessionController @Inject constructor(
612612 toastController.enqueue(it, isDeposit = true )
613613 showBill(
614614 bill = Bill .Cash (amount = it, didReceive = true ),
615- vibrate = true
616615 )
617616 checkPendingItemsInFeed()
618617 bringActivityFeedCurrent()
@@ -700,7 +699,6 @@ class RealSessionController @Inject constructor(
700699 toastController.enqueue(amount, isDeposit = true )
701700 showBill(
702701 bill = Bill .Cash (amount = amount, didReceive = true ),
703- vibrate = true
704702 )
705703 checkPendingItemsInFeed()
706704 bringActivityFeedCurrent()
@@ -718,7 +716,7 @@ class RealSessionController @Inject constructor(
718716 )
719717 }
720718
721- private fun presentBillToUser (data : List <Byte >, bill : Bill , isVibrate : Boolean = false ) {
719+ private fun presentBillToUser (data : List <Byte >, bill : Bill ) {
722720 if (billController.state.value.bill != null ) return
723721
724722 if (bill.didReceive) {
@@ -727,6 +725,8 @@ class RealSessionController @Inject constructor(
727725 valuation = PaymentValuation (bill.amount.converted),
728726 )
729727 }
728+
729+ vibrator.vibrate()
730730 }
731731
732732 val style: BillDeterminationResult =
@@ -756,10 +756,6 @@ class RealSessionController @Inject constructor(
756756// }
757757// )
758758 }
759-
760- if (isVibrate) {
761- vibrator.vibrate()
762- }
763759 }
764760
765761
0 commit comments