cph-cachet / carp_studies_app

The CARP Study App
MIT License
6 stars 1 forks source link

Task list not deleted when leaving a study #128

Closed bardram closed 1 year ago

bardram commented 1 year ago

When leaving a study on the phone, the user is taken to the list of invitations and can pick a new study. This loads the new study incl. informed consent etc. -- all of this is fine.

But - when coming to the list of tasks, the tasks listed include the old tasks from the previous study. The task list stored on the phone seems not to be deleted.

On the data viz page this entails that "Study Progress" and "Surveys" show wrong data.

But - the data viz also shown old data from e.g. "Media". So - maybe the ViewModel json for all models is not deleted either.

Also in the "Profile" page, the title of the study seems not to be changed (is showing the title of the old study).

bardram commented 1 year ago

What we should do:

  1. Stop study method in CAMS @bardram
    • delete local study deployment stuff incl. task list
    • send "stop" deployment to server
  2. Delete view models in the study app @bardram
  3. Update the title of the study in the Profile page @LarsRefsgaard
  4. Remove notifications from deleted studies. @bardram
bardram commented 1 year ago

I've solved and committed for #1 above (except that the "stop" deployment is not called from the app client - we don't want to support this for now).

Re. #2 - I've also added a delete method to the DataVisualizationPageViewModel which will delete all locally cached data viz elements. However, I've not yet figured out how to call this method. The whole BLOC architecture we have set up does not allow the bloc to call methods in the view -- this is a violation of the whole architecture. So.... need to think.

LarsRefsgaard commented 1 year ago

List item number three is not an error anyway.