Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove HomePageViewController code #3454

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 22 additions & 118 deletions DuckDuckGo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

123 changes: 0 additions & 123 deletions DuckDuckGo/Base.lproj/Home.storyboard

This file was deleted.

14 changes: 4 additions & 10 deletions DuckDuckGo/FavoritesHomeViewSectionRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protocol FavoritesHomeViewSectionRendererDelegate: AnyObject {
favoriteDeleted favorite: BookmarkEntity)
}

class FavoritesHomeViewSectionRenderer: NSObject, HomeViewSectionRenderer {
class FavoritesHomeViewSectionRenderer {

struct Constants {

Expand All @@ -43,7 +43,8 @@ class FavoritesHomeViewSectionRenderer: NSObject, HomeViewSectionRenderer {
static let defaultHeaderHeight: CGFloat = 20
static let horizontalMargin: CGFloat = 2
static let largeModeMargin: CGFloat = 24

static let sideInsets: CGFloat = 25
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracted from HomeViewSectionRenderers.swift file which was deleted.


}

let viewModel: FavoritesListInteracting
Expand Down Expand Up @@ -83,13 +84,6 @@ class FavoritesHomeViewSectionRenderer: NSObject, HomeViewSectionRenderer {
return Constants.defaultHeaderHeight
}

func install(into controller: HomeViewController) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is no longer necessary since there is no HomeViewController.

self.controller = controller
if numberOfItems > 0 {
controller.hideLogo()
}
}

func install(into controller: UIViewController & FavoritesHomeViewSectionRendererDelegate) {
self.controller = controller
}
Expand All @@ -103,7 +97,7 @@ class FavoritesHomeViewSectionRenderer: NSObject, HomeViewSectionRenderer {
if isPad {
margin = (collectionView.frame.width - Constants.searchWidthPad) / 2
} else {
let defaultMargin = HomeViewSectionRenderers.Constants.sideInsets
let defaultMargin = FavoritesHomeViewSectionRenderer.Constants.sideInsets
let landscapeMargin = (collectionView.frame.width - Constants.searchWidth + defaultMargin) / 2
margin = isPortrait ? defaultMargin : landscapeMargin
}
Expand Down
181 changes: 0 additions & 181 deletions DuckDuckGo/HomeCollectionView.swift

This file was deleted.

Loading
Loading