android-templates
android-templates copied to clipboard
[#159] Add DataStore preference to template-xml and template-compose
- Closes #159
What happened 👀
- Add DataStore Preference to Template-xml and Template-compose
Insight 📝
- We still keep the
EncryptedSharePreferences
for the sake of security preferences. - In terms of storing the data object, I think we should use
Room database
instead of usingDataStore Proto
because Room supports partial updates. So, I think we should focus on simplekey-value
preferences likeDataStore Preference
.
Proof Of Work 📹
The application runs successfully.
5 Warnings | |
---|---|
:warning: | Uh oh! UserPreferences.kt is under 95% coverage! |
:warning: | Uh oh! UserPreferencesRepositoryImpl.kt is under 95% coverage! |
:warning: | Uh oh! Your project is under 80% coverage! |
:warning: | Uh oh! Preferences.kt is under 95% coverage! |
:warning: | Uh oh! PreferencesRepositoryImpl.kt is under 95% coverage! |
Kover report for template-xml:
🧛 Template - XML Unit Tests Code Coverage: 27.62%
Coverage of Modified Files:
File | Coverage |
---|---|
UserPreferences.kt |
0.00% |
UserPreferencesRepositoryImpl.kt |
0.00% |
Modified Files Not Found In Coverage Report:
DataStoreModule.kt Preferences.kt PreferencesRepository.kt PreferencesRepositoryImpl.kt PreferencesRepositoryModule.kt StorageModule.kt StorageModule.kt UserPreferencesRepository.kt UserPreferencesRepositoryModule.kt Versions.kt Versions.kt build.gradle.kts build.gradle.kts build.gradle.kts build.gradle.kts
Codebase cunningly covered by count Shroud 🧛
Kover report for template-compose:
🧛 Template - Compose Unit Tests Code Coverage: 13.84%
Coverage of Modified Files:
File | Coverage |
---|---|
Preferences.kt |
0.00% |
PreferencesRepositoryImpl.kt |
0.00% |
Modified Files Not Found In Coverage Report:
DataStoreModule.kt PreferencesRepository.kt PreferencesRepositoryModule.kt StorageModule.kt StorageModule.kt UserPreferences.kt UserPreferencesRepository.kt UserPreferencesRepositoryImpl.kt UserPreferencesRepositoryModule.kt Versions.kt Versions.kt build.gradle.kts build.gradle.kts build.gradle.kts build.gradle.kts
Codebase cunningly covered by count Shroud 🧛
Generated by :no_entry_sign: Danger
Question 🙋♀️ @Tuubz @lydiasama In this PR we just provide the classes of DataStore
for template-xml
and template-compose
right? Do we have the plan to add a sample usecase(Integrate part in :app
) in another issue 🙏
Question 🙋♀️ @Tuubz @lydiasama In this PR we just provide the classes of
DataStore
fortemplate-xml
andtemplate-compose
right? Do we have the plan to add a sample usecase(Integrate part in:app
) in another issue 🙏
@Wadeewee Please check out the PR description. 🙏🏻
Question 🙋♀️ @Tuubz @lydiasama In this PR we just provide the classes of
DataStore
fortemplate-xml
andtemplate-compose
right? Do we have the plan to add a sample usecase(Integrate part in:app
) in another issue 🙏@Wadeewee Please check out the PR description. 🙏🏻
Sorry @lydiasama 😢 I didn't get which part of the description you refer about this 👇
Do we have the plan to add a sample usecase(Integrate part in
:app
)
Could you please guide me a bit 🙏 Maybe It's because I didn't similar with this much 🙈 cc @Tuubz
Question 🙋♀️ @Tuubz @lydiasama In this PR we just provide the classes of
DataStore
fortemplate-xml
andtemplate-compose
right? Do we have the plan to add a sample usecase(Integrate part in:app
) in another issue 🙏@Wadeewee Please check out the PR description. 🙏🏻
Sorry @lydiasama 😢 I didn't get which part of the description you refer about this 👇
Do we have the plan to add a sample usecase(Integrate part in
:app
)Could you please guide me a bit 🙏 Maybe It's because I didn't similar with this much 🙈 cc @Tuubz
@Wadeewee The sample code and use case should be inside of the Sample
repos. Although we implement the use case here in Template
repo, we don't use it anywhere, right? So I think it makes more sense to implement it at Sample.
@Tuubz Next time, please include this info in the issue. 🙏🏻
Question 🙋♀️ @Tuubz @lydiasama In this PR we just provide the classes of
DataStore
fortemplate-xml
andtemplate-compose
right? Do we have the plan to add a sample usecase(Integrate part in:app
) in another issue 🙏@Wadeewee Please check out the PR description. 🙏🏻
Sorry @lydiasama 😢 I didn't get which part of the description you refer about this 👇
Do we have the plan to add a sample usecase(Integrate part in
:app
)Could you please guide me a bit 🙏 Maybe It's because I didn't similar with this much 🙈 cc @Tuubz
@Wadeewee The sample code and use case should be inside of the
Sample
repos. Although we implement the use case here inTemplate
repo, we don't use it anywhere, right? So I think it makes more sense to implement it at Sample.@Tuubz Next time, please include this info in the issue. 🙏🏻
@lydiasama, I totally agree with you that the sample code and use case should be inside the sample
👍 but, back to this PR, Should we draft
this PR or not? Because we don't have a validate/verify
that the code we implemented works
as we don't have an integrated part yet? What do you think? cc @Tuubz
Question 🙋♀️ @Tuubz @lydiasama In this PR we just provide the classes of
DataStore
fortemplate-xml
andtemplate-compose
right? Do we have the plan to add a sample usecase(Integrate part in:app
) in another issue 🙏@Wadeewee Please check out the PR description. 🙏🏻
Sorry @lydiasama 😢 I didn't get which part of the description you refer about this 👇
Do we have the plan to add a sample usecase(Integrate part in
:app
)Could you please guide me a bit 🙏 Maybe It's because I didn't similar with this much 🙈 cc @Tuubz
@Wadeewee The sample code and use case should be inside of the
Sample
repos. Although we implement the use case here inTemplate
repo, we don't use it anywhere, right? So I think it makes more sense to implement it at Sample. @Tuubz Next time, please include this info in the issue. 🙏🏻@lydiasama, I totally agree with you that the sample code and use case should be inside the
sample
👍 but, back to this PR, Should wedraft
this PR or not? Because we don't have avalidate/verify
that the code we implementedworks
as we don't have an integrated part yet? What do you think? cc @Tuubz
Hmmm, it's true.
@lydiasama Would we somehow be able to provide a PoW that proves the current implementation works? 🙏
@lydiasama
- Do we have part 2 or only 2 parts of this task?
- Should we rebase this on https://github.com/nimblehq/android-templates/pull/389? 🤔
Let me clean it up. Will create a new PR. 🙏🏻