mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 11:05:19 +00:00
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:
@@ -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)") ||
|
||||
|
||||
Reference in New Issue
Block a user