diff --git a/apps/ios/Shared/Views/Chat/ChatView.swift b/apps/ios/Shared/Views/Chat/ChatView.swift index 96d0874f0e..e78589313f 100644 --- a/apps/ios/Shared/Views/Chat/ChatView.swift +++ b/apps/ios/Shared/Views/Chat/ChatView.swift @@ -76,20 +76,12 @@ struct ChatView: View { .onChange(of: chatModel.chatId) { _ in if chatModel.chatId == nil { dismiss() } } - .onChange(of: "\(composeState.empty) \(composeState.noPreview) \(composeState.message)") { _ in - if !composeState.empty { - chatModel.draft = composeState - chatModel.draftChatId = chat.id - } else if chatModel.draftChatId == chat.id { - chatModel.draft = nil - chatModel.draftChatId = nil - } - } .onDisappear { if chatModel.chatId == cInfo.id { chatModel.chatId = nil - if chatModel.draftChatId == cInfo.id { + if !composeState.empty { chatModel.draft = composeState + chatModel.draftChatId = chat.id } DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) { if chatModel.chatId == nil {