In #16 I set this to default to the UUID that's passed in to DeckStudyViewController. It would be nice to show the actual name of the deck from the data model instead.
That's actually going to be more difficult than it looks, hence why this isn't necessarily a good task for new folks.
Add a fetchDeck() method to DeckRepository that returns an AnyPublisher<DeckModel, Never> with the updates for just one deck. (I suppose in theory we could use fetchDeckList() and just filter the resulting [DeckModel], but that feels icky.
That will likely require some cleverness in DeckCoreDataRepository to ensure having multiple fetch controllers etc will work as expected.
Subscribe to fetchDeck() in DeckStudyViewModel.handle(.viewDidLoad).
In #16 I set this to default to the UUID that's passed in to
DeckStudyViewController
. It would be nice to show the actual name of the deck from the data model instead.That's actually going to be more difficult than it looks, hence why this isn't necessarily a good task for new folks.
fetchDeck()
method toDeckRepository
that returns anAnyPublisher<DeckModel, Never>
with the updates for just one deck. (I suppose in theory we could usefetchDeckList()
and just filter the resulting[DeckModel]
, but that feels icky.DeckCoreDataRepository
to ensure having multiple fetch controllers etc will work as expected.fetchDeck()
inDeckStudyViewModel.handle(.viewDidLoad)
.state.title
.