mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-08-15 07:06:11 +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:
parent
079f36664c
commit
eca70e69e7
@ -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)") ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user