forked from shadowfacts/Tusker
parent
0e60e74a8a
commit
733d50b642
|
@ -29,6 +29,12 @@ class Draft: Codable, ObservableObject {
|
|||
attachments.count > 0
|
||||
}
|
||||
|
||||
var textForPosting: String {
|
||||
// when using dictation, iOS sometimes leaves a U+FFFC OBJECT REPLACEMENT CHARACTER behind in the text,
|
||||
// which we want to strip out before actually posting the status
|
||||
text.replacingOccurrences(of: "\u{fffc}", with: "")
|
||||
}
|
||||
|
||||
init(accountID: String) {
|
||||
self.id = UUID()
|
||||
self.lastModified = Date()
|
||||
|
|
|
@ -197,7 +197,7 @@ struct ComposeView: View {
|
|||
self.isPosting = false
|
||||
|
||||
case let .success(uploadedAttachments):
|
||||
let request = Client.createStatus(text: draft.text,
|
||||
let request = Client.createStatus(text: draft.textForPosting,
|
||||
contentType: Preferences.shared.statusContentType,
|
||||
inReplyTo: draft.inReplyToID,
|
||||
media: uploadedAttachments,
|
||||
|
|
Loading…
Reference in New Issue