Create local image library in CoreContext if it doesn’t exist

This commit is contained in:
Benoit Martins 2026-03-05 16:26:42 +01:00
parent 3b10fbb7ce
commit e1d3df577f
4 changed files with 27 additions and 7 deletions

View file

@ -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 {

View file

@ -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"
}

View file

@ -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")"

View file

@ -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"
}
}
],