mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-18 04:38:27 +00:00
Create local image library in CoreContext if it doesn’t exist
This commit is contained in:
parent
3b10fbb7ce
commit
e1d3df577f
4 changed files with 27 additions and 7 deletions
|
|
@ -211,10 +211,26 @@ class CoreContext: ObservableObject {
|
|||
self.forceRemotePushToMatchVoipPushSettings(account: acc)
|
||||
}
|
||||
|
||||
let fm = FileManager.default
|
||||
|
||||
let folderURL = FileUtil.sharedContainerUrl().appendingPathComponent("Library/Images")
|
||||
if !fm.fileExists(atPath: folderURL.path) {
|
||||
do {
|
||||
try fm.createDirectory(
|
||||
at: folderURL,
|
||||
withIntermediateDirectories: true,
|
||||
attributes: nil
|
||||
)
|
||||
print("Images directory created.")
|
||||
} catch {
|
||||
print("Error creating directory: \(error)")
|
||||
}
|
||||
} else {
|
||||
print("Images directory already exists.")
|
||||
}
|
||||
|
||||
let container = FileUtil.sharedContainerUrl()
|
||||
let recordingsDir = container.appendingPathComponent("Library/Recordings")
|
||||
|
||||
let fm = FileManager.default
|
||||
|
||||
if !fm.fileExists(atPath: recordingsDir.path) {
|
||||
do {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ import Foundation
|
|||
|
||||
public enum AppGitInfo {
|
||||
public static let branch = "master"
|
||||
public static let commit = "fd2730661"
|
||||
public static let commit = "3b10fbb7c"
|
||||
public static let tag = "6.1.0-alpha"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -521,6 +521,8 @@ class ConversationViewModel: ObservableObject {
|
|||
self.conversationMessagesSection[0].rows[indexMessage!].message.reactions = reactionsTmp
|
||||
}
|
||||
}
|
||||
}, onFileTransferTerminated: { (message: ChatMessage, content: Content) in
|
||||
print("filePath ?????? 000")
|
||||
}, onFileTransferProgressIndication: { (message: ChatMessage, content: Content, offset: Int, total: Int) in
|
||||
if let indexMessage = self.conversationMessagesSection[0].rows.firstIndex(where: {$0.eventModel.eventLogId == message.messageId}) {
|
||||
|
||||
|
|
@ -2324,7 +2326,9 @@ class ConversationViewModel: ObservableObject {
|
|||
fileURL = baseURL.appendingPathComponent("\(counter)_\(contentName)")
|
||||
counter += 1
|
||||
}
|
||||
|
||||
|
||||
print("filePath 11 \(fileURL.path)")
|
||||
|
||||
content.filePath = fileURL.path
|
||||
Log.info(
|
||||
"[ConversationViewModel] File \(contentName) will be downloaded at \(content.filePath ?? "NIL")"
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
"location" : "https://gitlab.linphone.org/BC/public/linphone-sdk-swift-ios.git",
|
||||
"state" : {
|
||||
"branch" : "beta",
|
||||
"revision" : "b8d2de798884cea09a4fea52b2b0fdc7e3cd0c20"
|
||||
"revision" : "47f51cb77ab75911b88b642ddde772c88fe8dc36"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -149,8 +149,8 @@
|
|||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apple/swift-protobuf.git",
|
||||
"state" : {
|
||||
"revision" : "c169a5744230951031770e27e475ff6eefe51f9d",
|
||||
"version" : "1.33.3"
|
||||
"revision" : "5596511fce902e649c403cd4d6d5da1254f142b7",
|
||||
"version" : "1.35.1"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue