Skip to content

Commit 43df6c4

Browse files
committed
♻️ [refactor] Bool 타입 네이밍 isCurrentBookmarked로 변경
1 parent b7e5a2b commit 43df6c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Fitfty/Projects/Profile/Sources/Post/ViewModel/PostViewModel.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public final class PostViewModel {
2323
private var currentState: CurrentValueSubject<ViewModelState?, Never> = .init(nil)
2424
private var cancellables: Set<AnyCancellable> = .init()
2525
private var isBookmarked: Bool?
26-
private var currentIsBookmarked: Bool?
26+
private var isCurrentBookmarked: Bool?
2727
private var bookmarkCount: Int?
2828

2929
public init() { }
@@ -76,7 +76,7 @@ private extension PostViewModel {
7676
return
7777
}
7878
self.isBookmarked = response.data?.bookmarked
79-
self.currentIsBookmarked = response.data?.bookmarked
79+
self.isCurrentBookmarked = response.data?.bookmarked
8080
self.bookmarkCount = response.data?.bookmarkCnt
8181
self.currentState.send(.update(response))
8282
currentState.sink(receiveValue: { [weak self] state in
@@ -110,7 +110,7 @@ private extension PostViewModel {
110110
self.currentState.send(.errorMessage("북마크 업데이트 실패"))
111111
}
112112
self.isBookmarked = !isBookmarked
113-
self.currentState.send(.bookmark(self.currentIsBookmarked, self.isBookmarked, self.bookmarkCount))
113+
self.currentState.send(.bookmark(self.isCurrentBookmarked, self.isBookmarked, self.bookmarkCount))
114114
} catch {
115115
self.currentState.send(.errorMessage("북마크 업데이트 실패"))
116116
Logger.debug(error: error, message: "북마크 업데이트 실패")

0 commit comments

Comments
 (0)