Skip to content

Commit

Permalink
Register both old and new post card cells
Browse files Browse the repository at this point in the history
Updates the table view to register both the new and old post card
cells. This is done so that people switching the feature flag on/off
do not hit a crash.
  • Loading branch information
wargcm committed Oct 14, 2023
1 parent 1c3f32b commit d23d341
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ final class ReaderTableConfiguration {
}

private func setUpCardCell(_ tableView: UITableView) {
if FeatureFlag.readerImprovements.enabled {
tableView.register(ReaderPostCardCell.self, forCellReuseIdentifier: readerCardCellReuseIdentifier)
} else {
let nib = UINib(nibName: readerCardCellNibName, bundle: nil)
tableView.register(nib, forCellReuseIdentifier: oldReaderCardCellReuseIdentifier)
}
tableView.register(ReaderPostCardCell.self, forCellReuseIdentifier: readerCardCellReuseIdentifier)

// TODO: Delete when we remove the Reader Improvements v1 (`readerImprovements`) feature flag
let nib = UINib(nibName: readerCardCellNibName, bundle: nil)
tableView.register(nib, forCellReuseIdentifier: oldReaderCardCellReuseIdentifier)
}

private func setUpBlockerCell(_ tableView: UITableView) {
Expand Down

0 comments on commit d23d341

Please sign in to comment.