mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-02 21:39:36 +00:00
fix movie supported type
This commit is contained in:
parent
97798b2c35
commit
e00fd49d89
|
@ -116,7 +116,7 @@ extension StatusEditor {
|
||||||
matching: .any(of: [.images, .videos]),
|
matching: .any(of: [.images, .videos]),
|
||||||
photoLibrary: .shared())
|
photoLibrary: .shared())
|
||||||
.fileImporter(isPresented: $isFileImporterPresented,
|
.fileImporter(isPresented: $isFileImporterPresented,
|
||||||
allowedContentTypes: [.image, .video],
|
allowedContentTypes: [.image, .video, .movie],
|
||||||
allowsMultipleSelection: true)
|
allowsMultipleSelection: true)
|
||||||
{ result in
|
{ result in
|
||||||
if let urls = try? result.get() {
|
if let urls = try? result.get() {
|
||||||
|
|
|
@ -88,6 +88,9 @@ extension StatusEditor {
|
||||||
FileRepresentation(importedContentType: .movie) { receivedTransferrable in
|
FileRepresentation(importedContentType: .movie) { receivedTransferrable in
|
||||||
return MovieFileTranseferable(url: receivedTransferrable.localURL)
|
return MovieFileTranseferable(url: receivedTransferrable.localURL)
|
||||||
}
|
}
|
||||||
|
FileRepresentation(importedContentType: .video) { receivedTransferrable in
|
||||||
|
return MovieFileTranseferable(url: receivedTransferrable.localURL)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,8 @@ extension StatusEditor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onDrop(of: [.image, .video, .gif], delegate: focusedSEVM)
|
.onDrop(of: [.image, .video, .gif, .mpeg4Movie, .quickTimeMovie, .movie],
|
||||||
|
delegate: focusedSEVM)
|
||||||
.onChange(of: currentAccount.account?.id) {
|
.onChange(of: currentAccount.account?.id) {
|
||||||
mainSEVM.currentAccount = currentAccount.account
|
mainSEVM.currentAccount = currentAccount.account
|
||||||
for p in followUpSEVMs {
|
for p in followUpSEVMs {
|
||||||
|
|
|
@ -899,7 +899,7 @@ extension StatusEditor {
|
||||||
|
|
||||||
extension StatusEditor.ViewModel: DropDelegate {
|
extension StatusEditor.ViewModel: DropDelegate {
|
||||||
public func performDrop(info: DropInfo) -> Bool {
|
public func performDrop(info: DropInfo) -> Bool {
|
||||||
let item = info.itemProviders(for: [.image, .video, .gif])
|
let item = info.itemProviders(for: [.image, .video, .gif, .mpeg4Movie, .quickTimeMovie, .movie])
|
||||||
processItemsProvider(items: item)
|
processItemsProvider(items: item)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue