One small change
This commit is contained in:
@@ -558,9 +558,15 @@ struct AddEditProblemView: View {
|
||||
|
||||
// Save new image data and combine with existing paths
|
||||
var allImagePaths = imagePaths
|
||||
for data in imageData {
|
||||
if let relativePath = ImageManager.shared.saveImageData(data) {
|
||||
allImagePaths.append(relativePath)
|
||||
|
||||
// Only save NEW images (those beyond the existing imagePaths count)
|
||||
let newImagesStartIndex = imagePaths.count
|
||||
if imageData.count > newImagesStartIndex {
|
||||
for i in newImagesStartIndex..<imageData.count {
|
||||
let data = imageData[i]
|
||||
if let relativePath = ImageManager.shared.saveImageData(data) {
|
||||
allImagePaths.append(relativePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user