-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Map view as default View #3110
Add Map view as default View #3110
Conversation
|
||
private fun setLocationFromDbCollector() { | ||
viewLifecycleOwner.lifecycleScope.launch { | ||
delay(1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delay added to render service location into map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain why? Also need to move this number to a constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I came up with a weird issue, most of the time the flow wasn't collecting anything and screen just went white right after loading. Added a delay fixed this issue. Probably will re-investigate why it was happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah interesting, yea worth looking into a bit more but this seems like a reasonable fix for now. Can you add a comment in the code explaining this, and also move the 1k seconds to a semantically named constant here, like PRE_LOADING_TIMEOUT, or something clearer than that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you figure out why the flow wasn't collecting any items? Could it be an issue with subscribing to cold/hot flow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried some small fixes but no luck
@ellykits would you have sometime to look into this with me?
android/engine/src/main/java/org/smartregister/fhircore/engine/util/SharedPreferenceKey.kt
Show resolved
Hide resolved
...id/geowidget/src/main/java/org/smartregister/fhircore/geowidget/screens/GeoWidgetFragment.kt
Show resolved
Hide resolved
...uest/src/main/java/org/smartregister/fhircore/quest/ui/launcher/GeoWidgetLauncherFragment.kt
Outdated
Show resolved
Hide resolved
|
||
private fun setLocationFromDbCollector() { | ||
viewLifecycleOwner.lifecycleScope.launch { | ||
delay(1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you figure out why the flow wasn't collecting any items? Could it be an issue with subscribing to cold/hot flow?
...est/src/main/java/org/smartregister/fhircore/quest/ui/launcher/GeoWidgetLauncherViewModel.kt
Outdated
Show resolved
Hide resolved
android/quest/src/main/res/navigation/application_nav_graph.xml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add docs for this, and also make a not in the features list on this, it's a great new feature to support!
* configured map layers * configured visibility of location button, plane switcher and floating button on mapview
…h between Map and Register view
3139 switch bw map register
# Conflicts: # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/launcher/GeoWidgetLauncherViewModel.kt
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #3138
Engineer Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guideCode Reviewer Checklist
strings.xml
file