             self.continueListeningEpisodes = newEpisodes
             self.continueListeningCollectionView.reloadData()
             self.bookmarkTableView.reloadData()
+            self.layoutHeaderView()
         }
         endpointRequest.failure = { _ in
         }


        headerView.addSubview(continueListeningHeaderView)
        continueListeningHeaderView.snp.makeConstraints { make in
            make.top.leading.trailing.width.equalToSuperview()
            make.height.equalTo(continueListeningHeaderViewHeight)
        }


        //TODO: endpoint request
        continueListeningEpisodes.remove(at: indexPath.row)
        continueListeningCollectionView.reloadData()

        layoutHeaderView()
    }

    func layoutHeaderView() {
        if continueListeningEpisodes.isEmpty {
            bookmarkTableView.tableHeaderView = nil
            return
        }

        bookmarkTableView.tableHeaderView = headerView

        headerView.snp.remakeConstraints { make in
            make.width.top.centerX.equalToSuperview()
            make.height.equalTo(headerViewHeight).priority(999)
        }
        bookmarkTableView.layoutIfNeeded()
    }
}
