File tree Expand file tree Collapse file tree
Neki-iOS/Features/Archive/Sources/Presentation/Sources/Feature Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,8 +292,9 @@ struct ArchiveAlbumDetailFeature {
292292 case . onTapDownloadButton:
293293 guard !state. selectedIDs. isEmpty else { return . none }
294294 state. isLoading = true
295- let urls = state. selectedIDs. compactMap { state. photos [ id: $0] ? . imageURL }
296- return . run { send in
295+ return . run { [ photos = state. photos, selectedIDs = state. selectedIDs] send in
296+ let urls = selectedIDs. compactMap { photos [ id: $0] ? . imageURL }
297+
297298 let count = try await imageDownloadClient. downloadImages ( urls: urls)
298299 await send ( . downloadImagesResponse( successCount: count) )
299300 }
Original file line number Diff line number Diff line change @@ -105,8 +105,9 @@ struct ArchiveAllPhotosFeature {
105105 case . onTapDownloadButton:
106106 guard !state. selectedIDs. isEmpty else { return . none }
107107 state. isLoading = true
108- let urls = state. selectedIDs. compactMap { state. photos [ id: $0] ? . imageURL }
109- return . run { send in
108+ return . run { [ photos = state. photos, selectedIDs = state. selectedIDs] send in
109+ let urls = selectedIDs. compactMap { photos [ id: $0] ? . imageURL }
110+
110111 let count = try await imageDownloadClient. downloadImages ( urls: urls)
111112 await send ( . downloadImagesResponse( successCount: count) )
112113 }
Original file line number Diff line number Diff line change @@ -238,8 +238,9 @@ struct ArchiveFavoriteAlbumFeature {
238238
239239 case . onTapDownloadButton:
240240 guard !state. selectedIDs. isEmpty else { return . none }
241- let urls = state. selectedIDs. compactMap { state. photos [ id: $0] ? . imageURL }
242- return . run { send in
241+ return . run { [ photos = state. photos, selectedIDs = state. selectedIDs] send in
242+ let urls = selectedIDs. compactMap { photos [ id: $0] ? . imageURL }
243+
243244 let count = try await imageDownloadClient. downloadImages ( urls: urls)
244245 await send ( . downloadImagesResponse( successCount: count) )
245246 }
You can’t perform that action at this time.
0 commit comments