StanfordSpezi / SpeziKt

Kotlin & Android Version of the Stanford Spezi Framework
http://spezi.health/SpeziKt/
MIT License
7 stars 1 forks source link

added auth state listener to directly navigate to home when logged in #50

Closed Basler182 closed 1 day ago

Basler182 commented 2 weeks ago

auth state listener

:recycle: Current situation & Problem

37

:gear: Release Notes

:pencil: Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 73.91304% with 24 lines in your changes missing coverage. Please review.

Project coverage is 44.61%. Comparing base (1c2559c) to head (9fff5d9).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50/graphs/tree.svg?width=650&height=150&src=pr&token=rrQTC1h5A7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #50 +/- ## ============================================ + Coverage 43.67% 44.61% +0.95% - Complexity 310 318 +8 ============================================ Files 125 125 Lines 3813 3829 +16 Branches 552 558 +6 ============================================ + Hits 1665 1708 +43 + Misses 1999 1970 -29 - Partials 149 151 +2 ``` | [Flag](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | `35.90% <26.32%> (+0.43%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | `28.25% <70.66%> (+1.53%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [...edu/stanford/bdh/engagehf/MainActivityViewModel.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=app%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fbdh%2Fengagehf%2FMainActivityViewModel.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-YXBwL3NyYy9tYWluL2tvdGxpbi9lZHUvc3RhbmZvcmQvYmRoL2VuZ2FnZWhmL01haW5BY3Rpdml0eVZpZXdNb2RlbC5rdA==) | `100.00% <100.00%> (+9.31%)` | :arrow_up: | | [...dh/engagehf/education/EngageEducationRepository.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=app%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fbdh%2Fengagehf%2Feducation%2FEngageEducationRepository.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-YXBwL3NyYy9tYWluL2tvdGxpbi9lZHUvc3RhbmZvcmQvYmRoL2VuZ2FnZWhmL2VkdWNhdGlvbi9FbmdhZ2VFZHVjYXRpb25SZXBvc2l0b3J5Lmt0) | `0.00% <ø> (ø)` | | | [...cation/VideoSectionDocumentToVideoSectionMapper.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=app%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fbdh%2Fengagehf%2Feducation%2FVideoSectionDocumentToVideoSectionMapper.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-YXBwL3NyYy9tYWluL2tvdGxpbi9lZHUvc3RhbmZvcmQvYmRoL2VuZ2FnZWhmL2VkdWNhdGlvbi9WaWRlb1NlY3Rpb25Eb2N1bWVudFRvVmlkZW9TZWN0aW9uTWFwcGVyLmt0) | `0.00% <ø> (ø)` | | | [...nford/bdh/engagehf/navigation/screens/AppScreen.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=app%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fbdh%2Fengagehf%2Fnavigation%2Fscreens%2FAppScreen.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-YXBwL3NyYy9tYWluL2tvdGxpbi9lZHUvc3RhbmZvcmQvYmRoL2VuZ2FnZWhmL25hdmlnYXRpb24vc2NyZWVucy9BcHBTY3JlZW4ua3Q=) | `72.23% <100.00%> (+0.53%)` | :arrow_up: | | [...rd/bdh/engagehf/onboarding/EngageConsentManager.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=app%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fbdh%2Fengagehf%2Fonboarding%2FEngageConsentManager.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-YXBwL3NyYy9tYWluL2tvdGxpbi9lZHUvc3RhbmZvcmQvYmRoL2VuZ2FnZWhmL29uYm9hcmRpbmcvRW5nYWdlQ29uc2VudE1hbmFnZXIua3Q=) | `100.00% <100.00%> (+45.46%)` | :arrow_up: | | [.../spezi/core/bluetooth/domain/BLEDeviceConnector.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=core%2Fbluetooth%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fspezi%2Fcore%2Fbluetooth%2Fdomain%2FBLEDeviceConnector.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-Y29yZS9ibHVldG9vdGgvc3JjL21haW4va290bGluL2VkdS9zdGFuZm9yZC9zcGV6aS9jb3JlL2JsdWV0b290aC9kb21haW4vQkxFRGV2aWNlQ29ubmVjdG9yLmt0) | `88.24% <ø> (ø)` | | | [...nford/spezi/module/account/login/LoginViewModel.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=modules%2Faccount%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fspezi%2Fmodule%2Faccount%2Flogin%2FLoginViewModel.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-bW9kdWxlcy9hY2NvdW50L3NyYy9tYWluL2tvdGxpbi9lZHUvc3RhbmZvcmQvc3BlemkvbW9kdWxlL2FjY291bnQvbG9naW4vTG9naW5WaWV3TW9kZWwua3Q=) | `40.00% <ø> (ø)` | | | [...e/account/manager/FirebaseInvitationAuthManager.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=modules%2Faccount%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fspezi%2Fmodule%2Faccount%2Fmanager%2FFirebaseInvitationAuthManager.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-bW9kdWxlcy9hY2NvdW50L3NyYy9tYWluL2tvdGxpbi9lZHUvc3RhbmZvcmQvc3BlemkvbW9kdWxlL2FjY291bnQvbWFuYWdlci9GaXJlYmFzZUludml0YXRpb25BdXRoTWFuYWdlci5rdA==) | `0.00% <ø> (ø)` | | | [...spezi/module/account/manager/UserSessionManager.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=modules%2Faccount%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fspezi%2Fmodule%2Faccount%2Fmanager%2FUserSessionManager.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-bW9kdWxlcy9hY2NvdW50L3NyYy9tYWluL2tvdGxpbi9lZHUvc3RhbmZvcmQvc3BlemkvbW9kdWxlL2FjY291bnQvbWFuYWdlci9Vc2VyU2Vzc2lvbk1hbmFnZXIua3Q=) | `100.00% <100.00%> (ø)` | | | [...stanford/spezi/module/account/manager/UserState.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree&filepath=modules%2Faccount%2Fsrc%2Fmain%2Fkotlin%2Fedu%2Fstanford%2Fspezi%2Fmodule%2Faccount%2Fmanager%2FUserState.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-bW9kdWxlcy9hY2NvdW50L3NyYy9tYWluL2tvdGxpbi9lZHUvc3RhbmZvcmQvc3BlemkvbW9kdWxlL2FjY291bnQvbWFuYWdlci9Vc2VyU3RhdGUua3Q=) | `100.00% <100.00%> (ø)` | | | ... and [9 more](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [1c2559c...9fff5d9](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/50?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi).
Basler182 commented 1 week ago

Thank you for working on this @Basler182; I would defer to @eldcn and @pauljohanneskraft for a detailed review 👍

i spoke to @eldcn earlier. he is working on the changes we discussed on tuesday and is removing the firebase auth module from the app. he will then merge the changes into this branch and then we can merge everything together into the master 🚀

PSchmiedmayer commented 1 week ago

Sounds great; thank you @Basler182 and @eldcn!

eldcn commented 1 week ago

@Basler182, @PSchmiedmayer , @pauljohanneskraft I just merged #55 pointing to this branch 🙌