Added the "coordination" weak property to the FeedListViewModel view model in the Feed framework.
This commit is contained in:
parent
1618a8d841
commit
aacc0fa0fe
@ -34,7 +34,10 @@ public final class FeedListCoordinator: Coordinator {
|
|||||||
onDismiss: Router.OnDismissClosure? = nil
|
onDismiss: Router.OnDismissClosure? = nil
|
||||||
) {
|
) {
|
||||||
router.present(
|
router.present(
|
||||||
FeedListViewController(.init(configuration: configuration)),
|
FeedListViewController(.init(
|
||||||
|
configuration: configuration,
|
||||||
|
coordination: self
|
||||||
|
)),
|
||||||
animated: animated,
|
animated: animated,
|
||||||
onDismiss: onDismiss
|
onDismiss: onDismiss
|
||||||
)
|
)
|
||||||
|
@ -27,18 +27,24 @@ extension FeedListViewController {
|
|||||||
|
|
||||||
var items: [Review] = []
|
var items: [Review] = []
|
||||||
var words: [TopWord] = []
|
var words: [TopWord] = []
|
||||||
|
|
||||||
private var reviewsAll: [Review] = []
|
private var reviewsAll: [Review] = []
|
||||||
private var reviewsFiltered: FilteredReviews = [:]
|
private var reviewsFiltered: FilteredReviews = [:]
|
||||||
private var reviewsTopWords: TopWordsReviews = [:]
|
private var reviewsTopWords: TopWordsReviews = [:]
|
||||||
|
|
||||||
|
private weak var coordination: FeedListCoordination?
|
||||||
|
|
||||||
lazy private var iTunesService: iTunesService = {
|
lazy private var iTunesService: iTunesService = {
|
||||||
.init(configuration: .init(session: configuration.session))
|
.init(configuration: .init(session: configuration.session))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// MARK: Initialisers
|
// MARK: Initialisers
|
||||||
init(configuration: FeedListConfiguration = .init()) {
|
init(
|
||||||
|
configuration: FeedListConfiguration = .init(),
|
||||||
|
coordination: FeedListCoordination? = nil
|
||||||
|
) {
|
||||||
self.configuration = configuration
|
self.configuration = configuration
|
||||||
|
self.coordination = coordination
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Computed
|
// MARK: Computed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user