igorkulman / iOSSampleApp

Sample iOS app demonstrating Coordinators, Dependency Injection, MVVM, Binding
MIT License
893 stars 91 forks source link

Single responsability #32

Closed JAIRMG closed 4 years ago

JAIRMG commented 4 years ago

I think that saving the user data, for example the onBoardingData should be responsability of the ViewModel, what do you think?. Nice project btw!

igorkulman commented 4 years ago

What do you mean by onboarding data? In the setup flow the ViewModel saves the RSS source the user selects: https://github.com/igorkulman/iOSSampleApp/blob/master/Sources/iOSSampleApp/Scenarios/Setup/ViewModels/SourceSelectionViewModel.swift#L80

JAIRMG commented 4 years ago

The OnBoardingCoordinator is saving the settings and the SetOptionsViewModel is practically empty, that's what I mean. This self.dataManager.set(key: SettingKey.onBoardingData, value: data) I think is a ViewModel responsability

igorkulman commented 4 years ago

There is no OnBoardingCoordinator in this code base.