mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 02:01:02 +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: {
|
} label: {
|
||||||
Image(systemName: "plus")
|
Image(systemName: "plus")
|
||||||
}
|
}
|
||||||
.padding(.bottom, 5)
|
.padding(.bottom, 6)
|
||||||
TextField("New messge", text: $viewModel.newMessageText, axis: .vertical)
|
TextField("New messge", text: $viewModel.newMessageText, axis: .vertical)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
.focused($isMessageFieldFocused)
|
.focused($isMessageFieldFocused)
|
||||||
.keyboardType(.default)
|
.keyboardType(.default)
|
||||||
|
.font(.scaledBody)
|
||||||
if !viewModel.newMessageText.isEmpty {
|
if !viewModel.newMessageText.isEmpty {
|
||||||
Button {
|
Button {
|
||||||
Task {
|
Task {
|
||||||
|
@ -132,7 +133,7 @@ public struct ConversationDetailView: View {
|
||||||
Image(systemName: "paperplane")
|
Image(systemName: "paperplane")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.keyboardShortcut("n", modifiers: .command)
|
.keyboardShortcut(.return, modifiers: .command)
|
||||||
.padding(.bottom, 5)
|
.padding(.bottom, 5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -482,6 +482,9 @@ public class StatusEditorViewModel: ObservableObject {
|
||||||
movieTransferable: nil,
|
movieTransferable: nil,
|
||||||
mediaAttachment: uploadedMedia,
|
mediaAttachment: uploadedMedia,
|
||||||
error: nil)
|
error: nil)
|
||||||
|
if let uploadedMedia, uploadedMedia.url == nil {
|
||||||
|
scheduleAsyncMediaRefresh(mediaAttachement: uploadedMedia)
|
||||||
|
}
|
||||||
} else if let videoURL = originalContainer.movieTransferable?.url,
|
} else if let videoURL = originalContainer.movieTransferable?.url,
|
||||||
let data = try? Data(contentsOf: videoURL) {
|
let data = try? Data(contentsOf: videoURL) {
|
||||||
let uploadedMedia = try await uploadMedia(data: data, mimeType: videoURL.mimeType())
|
let uploadedMedia = try await uploadMedia(data: data, mimeType: videoURL.mimeType())
|
||||||
|
|
Loading…
Reference in a new issue