@@ -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