Skip to content

Commit

Permalink
[Fix] 주차별 리스트뷰 북마크 데이터 전달 indexPath.row 값 변경(Team-LionHeart#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjk4618 committed Jul 21, 2023
1 parent 05ef273 commit b6ae2ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ final class CurriculumArticleByWeekTableViewCell: UITableViewCell, TableViewCell
button.setImage(ImageLiterals.BookMark.activeBookmarkSmall, for: .selected)
button.addButtonAction { _ in

let indexPath = self.getIndexPath()
guard var indexPath = self.getIndexPath() else { return }
NotificationCenter.default.post(name: NSNotification.Name("isArticleBookmarked"),
object: nil, userInfo: ["bookmarkCellIndexPath": indexPath?.row ?? 0,
object: nil, userInfo: ["bookmarkCellIndexPath": indexPath.row-1,
"bookmarkButtonSelected": !button.isSelected])
button.isSelected.toggle()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ extension CurriculumListByWeekCollectionViewCell: UITableViewDataSource{
if indexPath.row == 0 {

let cell = CurriculumArticleByWeekRowZeroTableViewCell.dequeueReusableCell(to: curriculumListByWeekTableView)
guard let weekCount else { return CurriculumTableViewCell() }
// guard let weekCount else { return CurriculumTableViewCell() }
cell.inputData = inputData?.week
return cell
} else {
Expand All @@ -129,7 +129,7 @@ extension CurriculumListByWeekCollectionViewCell: UITableViewDataSource{
} else {
guard let inputData else { return }
NotificationCenter.default.post(name: NSNotification.Name("didSelectTableViewCell"),
object: inputData.articleData[indexPath.row - 1].articleId)
object: inputData.articleData[indexPath.row-1].articleId)

}
}
Expand Down

0 comments on commit b6ae2ce

Please sign in to comment.