From 20b0b7604b87b370bdb181a1220611468c72feb1 Mon Sep 17 00:00:00 2001 From: jeonjimin Date: Sun, 13 Aug 2023 23:04:02 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20#470=20-=20userCurationCell=20?= =?UTF-8?q?=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExploreCurationViewModels/ReadCurationViewModel.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HappyAnding/HappyAnding/ViewModel/ExploreCurationViewModels/ReadCurationViewModel.swift b/HappyAnding/HappyAnding/ViewModel/ExploreCurationViewModels/ReadCurationViewModel.swift index 0d2a9bd7..fe2a8b64 100644 --- a/HappyAnding/HappyAnding/ViewModel/ExploreCurationViewModels/ReadCurationViewModel.swift +++ b/HappyAnding/HappyAnding/ViewModel/ExploreCurationViewModels/ReadCurationViewModel.swift @@ -53,6 +53,13 @@ final class ReadCurationViewModel: ObservableObject { window.rootViewController?.present(activityVC, animated: true, completion: nil) } + func fetchCuration() { + if let index = shortcutsZipViewModel.userCurations.firstIndex(where: {$0.id == self.curation.id}) { + self.curation = shortcutsZipViewModel.userCurations[index] + print("curation", self.curation) + } + } + func fetchShortcut(from shortcutCellModel: ShortcutCellModel) -> Shortcuts { shortcutsZipViewModel.fetchShortcutDetail(id: shortcutCellModel.id) ?? Shortcuts() }