|
Ran
|
Jobs
1
|
Files
92
|
Run time
3s
|
Badge
README BADGES
|
push
travis-ci
Fix annotating while signed out If the user creates annotations while signed out and then signs in, we want those annotations to still be present in the sidebar after sign in, rather than being lost. Commit <a class=hub.com/hypothesis/h/commit/7a1b5ca8d99252d3a086a8a8103fca4702521d06">7a1b5ca8d had inadvertently broken this. The problem is that app.coffee destroys all AnnotationController instances on sign in, and only creates new instances for those annotations that have drafts. 7a1b5ca8d99252d3a086a8a8103fca4702521d06 removed a spurious call to saveToDrafts() in vm.edit() but it turns out that this call was (apparently inadvertently) the only thing that was causing drafts of annotations created while signed out to be saved, and hence the only thing causing these annotations to persist across sign ins. So add a listener for the USER_CHANGED event and save drafts of annotations on sign in, just before the AnnotationControllers get destroyed.
2619 of 3719 relevant lines covered (70.42%)
0.7 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 9384.1 | 0 |
70.42 |
Travis Job 9384.1 |