mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 08:20:59 +00:00
Few fixes for the field in DM + fix async upload for images
This commit is contained in:
parent
a20d259bb2
commit
b527fafd37
2 changed files with 6 additions and 2 deletions
|
@ -115,11 +115,12 @@ public struct ConversationDetailView: View {
|
|||
} label: {
|
||||
Image(systemName: "plus")
|
||||
}
|
||||
.padding(.bottom, 5)
|
||||
.padding(.bottom, 6)
|
||||
TextField("New messge", text: $viewModel.newMessageText, axis: .vertical)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.focused($isMessageFieldFocused)
|
||||
.keyboardType(.default)
|
||||
.font(.scaledBody)
|
||||
if !viewModel.newMessageText.isEmpty {
|
||||
Button {
|
||||
Task {
|
||||
|
@ -132,7 +133,7 @@ public struct ConversationDetailView: View {
|
|||
Image(systemName: "paperplane")
|
||||
}
|
||||
}
|
||||
.keyboardShortcut("n", modifiers: .command)
|
||||
.keyboardShortcut(.return, modifiers: .command)
|
||||
.padding(.bottom, 5)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -482,6 +482,9 @@ public class StatusEditorViewModel: ObservableObject {
|
|||
movieTransferable: nil,
|
||||
mediaAttachment: uploadedMedia,
|
||||
error: nil)
|
||||
if let uploadedMedia, uploadedMedia.url == nil {
|
||||
scheduleAsyncMediaRefresh(mediaAttachement: uploadedMedia)
|
||||
}
|
||||
} else if let videoURL = originalContainer.movieTransferable?.url,
|
||||
let data = try? Data(contentsOf: videoURL) {
|
||||
let uploadedMedia = try await uploadMedia(data: data, mimeType: videoURL.mimeType())
|
||||
|
|
Loading…
Reference in a new issue