nowinandroid
nowinandroid copied to clipboard
Change `UserData` to `UserPreferences`
"Preferences" more accurately describes the data this model contains.
Also requires changing the *UserDataRepository objects to *UserPreferencesRepository
I'm quite new to this so I'd like to confirm the following:
- you want all mentions of
UserDatato be changed toUserPreferences - same as above, all
UserDataRepositorymentions should be changed toUserPreferencesRepositorydid I get it right?
@dturner renaming UserData to UserPreferences will conflict with com.google.samples.apps.nowinandroid.core.datastore.UserPreferences that's generated by user_preferences.proto
I think we should pick another name 🤔
Thanks both for your interest in this issue. The thinking behind this is the type of data stored in this class:
data class UserData(
val bookmarkedNewsResources: Set<String>,
val followedTopics: Set<String>,
val followedAuthors: Set<String>,
val themeBrand: ThemeBrand,
val darkThemeConfig: DarkThemeConfig,
)
Should we describe this as:
UserPreferencesand potentially renamedatastore.UserPreferencesto avoid a clash (thanks for pointing this out @MohNage7 ). Another issue is that on Android the termpreferencesis already a commonly used term e.g.SharedPreferences.- something else. Open to suggestions.
- keep as
UserData?
@dturner Thanks for your reply.
IMHO, I think we can rename the proto class to UserPreferencesStore / UserPreferencesCache or go with the last option and leave UserData as is. Please let me know WDYT?
How about changing the name UserData to UserSettings?
Thanks for the suggestions. I'm inclined to leave as-is for now. It's likely that we'll store other information here in future and UserData is generic enough to accommodate that.