mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 07:15:35 +01:00
FIX: Haptic was looping
This commit is contained in:
parent
ae22eaea66
commit
fbfa310b52
1 changed files with 6 additions and 1 deletions
|
@ -184,12 +184,17 @@ const LNDViewInvoice = () => {
|
|||
|
||||
useEffect(() => {
|
||||
if (invoice.ispaid && invoiceStatusChanged) {
|
||||
ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false });
|
||||
setInvoiceStatusChanged(true);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [invoice]);
|
||||
|
||||
useEffect(() => {
|
||||
if (invoiceStatusChanged) {
|
||||
ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false });
|
||||
}
|
||||
}, [invoiceStatusChanged]);
|
||||
|
||||
const onLayout = e => {
|
||||
const { height, width } = e.nativeEvent.layout;
|
||||
setQRCodeSize(height > width ? width - 40 : e.nativeEvent.layout.width / 1.8);
|
||||
|
|
Loading…
Add table
Reference in a new issue