Skip to content

Commit

Permalink
[Fix] 주차별 아티클 토스트 메시지 높이값 조절(Team-LionHeart#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjk4618 committed Jul 21, 2023
1 parent ceb53e5 commit eb65f64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,19 @@ private extension CurriculumListByWeekViewController {
@objc func bookmarkButtonTapped(notification: NSNotification) {
Task {
do {

guard let indexPath = notification.userInfo?["bookmarkCellIndexPath"] as? Int else { return }
guard let buttonSelected = notification.userInfo?["bookmarkButtonSelected"] as? Bool else { return }
guard let listByWeekDatas else { return }


print(indexPath)
print(buttonSelected)
try await BookmarkService.shared.postBookmark(
BookmarkRequest(articleId: listByWeekDatas.articleData[indexPath].articleId,
bookmarkStatus: buttonSelected))
hideLoading()
buttonSelected ? LHToast.show(message: "북마크가 추가되었습니다") : LHToast.show(message: "북마크가 해제되었습니다")
buttonSelected ? LHToast.show(message: "북마크가 추가되었습니다", isTabBar: true) : LHToast.show(message: "북마크가 해제되었습니다", isTabBar: true)
} catch {
guard let error = error as? NetworkError else { return }
handleError(error)
Expand All @@ -182,7 +187,7 @@ private extension CurriculumListByWeekViewController {
? weekToIndexPathItem + 1
: currentPage + 1

guard let listByWeekDatas else { return }
// guard let listByWeekDatas else { return }
let nextPage = min(pregnancy - 1, nextIndexPathItem)
self.currentPage = nextPage
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ extension CurriculumViewController: UITableViewDataSource {
}

extension CurriculumViewController: UITableViewDelegate{
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// let curriculumListByWeekViewController = CurriculumListByWeekViewController()
// self.navigationController?.pushViewController(curriculumListByWeekViewController, animated: true)
}
// }
}

extension CurriculumViewController: ViewControllerServiceable {
Expand Down

0 comments on commit eb65f64

Please sign in to comment.