Skip to content

Create ListingViewModel and convert FeedViewModel to use #63

Open
@kgellci

Description

@kgellci

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions