Skip to content
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

Use Async Storage to store study file #18

Merged
merged 16 commits into from
Aug 1, 2020
Merged

Use Async Storage to store study file #18

merged 16 commits into from
Aug 1, 2020

Conversation

hesyifei
Copy link
Member

@hesyifei hesyifei commented Aug 1, 2020

  • Store StudyFile (i.e., StudyInfo & Streams) in Async Storage.
    • StudyInfo and Streams are stored separately (i.e., there isn't a Async Storage key storing StudyFile). It is because StudyInfo is usually more frequently used and tends to be smaller than Streams. Storing them separately probably could improve performance.
  • Preparing for support downloading study file JSON.
  • Created an error screen to show problems related to the survey file.
  • Moved meta.startingQuestionIds to studyInfo.streamsStartingQuestionIds.
  • Created mockCurrentStudyInfo helper function to help testing.
  • Removed the confusing studyInfo parameter in setNotificationsAsync and getCurrentNotificationTimeAsync.
    • These functions will get study info directly from the getStudyInfoAsync() function.

Part of #3 and #11.

@hesyifei hesyifei added enhancement New feature or request testing labels Aug 1, 2020
@hesyifei hesyifei self-assigned this Aug 1, 2020
so that `parseJsonToStudyFile` can show the whole path info to better help find the wrong part
@hesyifei hesyifei merged commit 0e67ad7 into master Aug 1, 2020
@hesyifei hesyifei deleted the download-json branch August 1, 2020 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant