• Robert Knight's avatar
    Fix stale copies of annotations being reloaded when switching groups (#110) · ead7c07d
    Robert Knight authored
    Previously when switching groups all of the currently loaded annotations
    would be unloaded and then potentially outdated copies of the annotation
    from the drafts store would be reloaded into the annotation store.
    
    This commit fixes that problem by:
    
     1. Only unloading saved annotations when switching groups.
    
     2. Only storing the annotation ID and tag in the drafts service, to
        ensure that we don't try to use it as a complete annotation anywhere
    
    A consequence of (1) is that new, unsaved annotations no-longer briefly
    disappear when switching groups.
    
    This fixes the problem described in #109 where the orphan status of a
    new annotation is lost when switching groups. It does not fix the
    problem where the new annotation immediately becomes an orphan.
    ead7c07d
annotation-ui.js 4.04 KB