Fix Crash when receiving notification from the background

In my testing the app crashes in the background when receiving a notification. This is probably due to UIFeedbackGenerator requiring the main thread which isn't available
This commit is contained in:
Ryan Nair
2025-07-19 22:01:23 -04:00
committed by GitHub
parent 079f36664c
commit eca70e69e7
+3 -1
View File
@@ -3436,7 +3436,9 @@ extension ChatViewModel: BitchatDelegate {
#if os(iOS)
// Haptic feedback for iOS only
guard UIApplication.shared.applicationState == .active else {
return
}
// Check if this is a hug message directed at the user
let isHugForMe = message.content.contains("🫂") &&
(message.content.contains("hugs \(nickname)") ||