You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
8. SharedPreferences to Proto DataStore is already very chaotic in terms of modifications that ain't clear whether they apply to UserPreferencesRepository.kt or to TasksActivity.kt or maybe to both.
That's because, in previous steps, the lab mandates to temporarily create a Context extension property userPreferencesStore that it's also temporarily injected from TasksActivity into UserPreferencesRepository.
But once at step 8. SharedPreferences to Proto DataStore, lots of these temporary things become finalized although the lab only tells what to edit but not where.
At some point, it requests to redefine userPreferencesStore but this time not as a Context extension property but as a presumably UserPreferencesRepository property. It doesn't clarify whose this redefinition belongs. I presume that it's UserPreferencesRepository.
It doesn't end there, though: the new definition invokes a non-existing context.createDataStore(...) function as follows:
If my guessing is correct, the lab should include my guessed definition for God's sake.
The provided finished branch proto_datastore just stuck to the temporary definition (contradicting the lab instructions that called for a redefinition.)
The text was updated successfully, but these errors were encountered:
8. SharedPreferences to Proto DataStore is already very chaotic in terms of modifications that ain't clear whether they apply to
UserPreferencesRepository.kt
or toTasksActivity.kt
or maybe to both.That's because, in previous steps, the lab mandates to temporarily create a
Context
extension propertyuserPreferencesStore
that it's also temporarily injected fromTasksActivity
intoUserPreferencesRepository
.But once at step 8. SharedPreferences to Proto DataStore, lots of these temporary things become finalized although the lab only tells what to edit but not where.
At some point, it requests to redefine
userPreferencesStore
but this time not as aContext
extension property but as a presumablyUserPreferencesRepository
property. It doesn't clarify whose this redefinition belongs. I presume that it'sUserPreferencesRepository
.It doesn't end there, though: the new definition invokes a non-existing
context.createDataStore(...)
function as follows:I could only finish the lab by figuring out the missing extension function as follows:
If my guessing is correct, the lab should include my guessed definition for God's sake.
The provided finished branch
proto_datastore
just stuck to the temporary definition (contradicting the lab instructions that called for a redefinition.)The text was updated successfully, but these errors were encountered: