File tree Expand file tree Collapse file tree
Neki-iOS/Features/Archive/Sources/Data/Sources Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -362,11 +362,18 @@ extension DefaultArchiveRepository {
362362 let endpoint = ArchiveEndpoint . deletePhoto ( request: request)
363363 let _ = try await networkProvider. request ( endpoint: endpoint)
364364
365- for (key, var list) in photoCache {
365+ for (folderID, var list) in photoCache {
366+ let originalCount = list. count
366367 list. removeAll { photoIDs. contains ( $0. photoID) }
367- photoCache [ key] = list
368+
369+ // 기존 갯수보다 줄어들었다면 해당 앨범에서 사진이 삭제되었다는 뜻
370+ if list. count < originalCount {
371+ self . isPhotoCacheDirty [ folderID] = true
372+ photoCache [ folderID] = list
373+ }
368374 }
369375
376+ self . isPhotoCacheDirty [ nil ] = true
370377 self . isAlbumCacheDirty = true
371378 self . isFavoriteCacheDirty = true
372379 self . isFavoriteAlbumInfoDirty = true
You can’t perform that action at this time.
0 commit comments