Skip to content

Commit

Permalink
Merge pull request #835 from DeluxeAlonso/feature/localization
Browse files Browse the repository at this point in the history
Feature/localization
  • Loading branch information
DeluxeAlonso authored Mar 4, 2024
2 parents 8265a5a + 2a9b766 commit 6a87ed1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ class CustomListDetailViewController: UIViewController, Storyboarded {

static var storyboardName = "CustomLists"

private var headerView: CustomListDetailHeaderView!
private var headerView: CustomListDetailHeaderView?
private var dataSource: SimpleTableViewDataSource<MovieListCellViewModelProtocol>?

private var dataSource: SimpleTableViewDataSource<MovieListCellViewModelProtocol>!
private var displayedCellsIndexPaths = Set<IndexPath>()

/// Used to determinate if the header view is being presented or not.
Expand Down Expand Up @@ -88,19 +88,20 @@ class CustomListDetailViewController: UIViewController, Storyboarded {
}

private func setupTableViewHeader() {
headerView = CustomListDetailHeaderView.loadFromNib()
let headerView = CustomListDetailHeaderView.loadFromNib()
headerView.viewModel = viewModel?.buildHeaderViewModel()

headerView.setHeaderOffset(navigationBarHeight)
headerView.frame = CGRect(x: 0, y: 0, width: headerView.frame.width, height: headerView.frame.height - navigationBarHeight)

tableView.clipsToBounds = false
tableView.tableHeaderView = headerView
self.headerView = headerView
}

private func reloadTableView() {
guard let viewModel = viewModel else { return }
dataSource = SimpleTableViewDataSource.make(for: viewModel.movieCells)
self.dataSource = SimpleTableViewDataSource.make(for: viewModel.movieCells)
tableView.dataSource = dataSource
tableView.reloadData()
}
Expand Down
2 changes: 1 addition & 1 deletion UpcomingMovies/Scenes/Splash/SplashViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

class SplashViewController: UIViewController, Storyboarded {
final class SplashViewController: UIViewController, Storyboarded {

static var storyboardName: String = "Main"

Expand Down

0 comments on commit 6a87ed1

Please sign in to comment.