I still don’t understand why it’s being done in a loop though
#[0], zap vibration improvement with UINotificationFeedbackGenerator
https://github.com/damus-io/damus/pull/776
It gave me a jolt, please review!
Discussion
⚡️ I tested it with and without the loop on my real device. The loop intensifies the vibration a little bit more. Without the loop, it is just another tickle. There are two loops for a case where sats’ greater than 10,000. The parent loop periodically runs the vibration for that many times the quotient of the received amount when divided by 10,000
I don’t understand why there isn’t a single call that does a notification-like vibration.
This function call vibration_generator.notificationOccurred(.success) does the vibration. The vibration_generator is an instance of UINotificationFeedbackGenerator