Skip to content

Commit 4f3d146

Browse files
committed
Fix FavoriteViewPresenter
1 parent 3437684 commit 4f3d146

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

iOSDesignPatternSamples/Sources/UI/Favorite/FavoriteViewPresenter.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ import GithubKit
1212
protocol FavoritePresenter: class {
1313
var view: FavoriteView? { get set }
1414
var numberOfFavorites: Int { get }
15-
func addFavorite(_ repository: Repository)
16-
func removeFavorite(_ repository: Repository)
1715
func favoriteRepository(at index: Int) -> Repository
1816
func showFavoriteRepository(at index: Int)
19-
func contains(_ repository: Repository) -> Bool
2017
}
2118

2219
final class FavoriteViewPresenter: FavoritePresenter {
@@ -37,18 +34,6 @@ final class FavoriteViewPresenter: FavoritePresenter {
3734
return model.favorites[index]
3835
}
3936

40-
func addFavorite(_ repository: Repository) {
41-
model.addFavorite(repository)
42-
}
43-
44-
func removeFavorite(_ repository: Repository) {
45-
model.removeFavorite(repository)
46-
}
47-
48-
func contains(_ repository: Repository) -> Bool {
49-
return model.favorites.firstIndex { $0.url == repository.url } != nil
50-
}
51-
5237
func showFavoriteRepository(at index: Int) {
5338
let repository = model.favorites[index]
5439
view?.showRepository(with: repository)

0 commit comments

Comments
 (0)