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

Create ListingViewModel and convert FeedViewModel to use #63

Open
kgellci opened this issue Feb 24, 2019 · 0 comments
Open

Create ListingViewModel and convert FeedViewModel to use #63

kgellci opened this issue Feb 24, 2019 · 0 comments

Comments

@kgellci
Copy link
Owner

kgellci commented Feb 24, 2019

FeedViewModel has logic for formatting listings. It is doing this by mutating the Listing objects in place.

https://github.com/kgellci/Area51/blob/master/Area51/Sources/ViewModels/FeedViewModel.swift#L37

We should instead instantiate ListingViewModel from a listing which will apply the needed formatting to the required fields. We can probably convert ListingsDataSource to be a ListingViewModelDataSource which would give the added benefit of only formatting listings once instead of every time more listings are loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant