I was trying to reproduce the bug of #284 but couldn't, because it had already been fixed in #279. So I guess the bugs only occurred in app version 3.5. #279 states CourseActivity: Our workaround was to observe the course only once and to ignore changes resulting e.g. from enrollments (resulting in bugs like #269).. This also included changes in course area states such as course accessibility, because no observer would be active in the activity, resulting in not setting it up again when the user refreshed (and possibly always operating on outdated data that is returned on the first observe). #279 introduced such an observer which sets up the course when the database model changes. When only the tabs "Description" and "Certificates" are displayed, both of their fragments fetch the course model on refresh, which means any refresh in them also refreshes the activity (which is convenient). Other fragments such as "Learnings" do not do this. As an enhancement I made the activity also react to clicking "Refresh" in the menu.
I tested the behavior by manually altering the value of accessible in the Course.JsonModel in the GetCourseJob and applying changes to the activity without restarting the app. It rendered following behavior:
I was trying to reproduce the bug of #284 but couldn't, because it had already been fixed in #279. So I guess the bugs only occurred in app version 3.5. #279 states
CourseActivity: Our workaround was to observe the course only once and to ignore changes resulting e.g. from enrollments (resulting in bugs like #269).
. This also included changes in course area states such as course accessibility, because no observer would be active in the activity, resulting in not setting it up again when the user refreshed (and possibly always operating on outdated data that is returned on the first observe). #279 introduced such an observer which sets up the course when the database model changes. When only the tabs "Description" and "Certificates" are displayed, both of their fragments fetch the course model on refresh, which means any refresh in them also refreshes the activity (which is convenient). Other fragments such as "Learnings" do not do this. As an enhancement I made the activity also react to clicking "Refresh" in the menu.I tested the behavior by manually altering the value of
accessible
in theCourse.JsonModel
in theGetCourseJob
and applying changes to the activity without restarting the app. It rendered following behavior:Fixes #284