• Robert Knight's avatar
    Preserve local tag and anchoring status flags when annotations are updated (#87) · 1832a97c
    Robert Knight authored
    When receiving annotation updates via the WebSocket, merge the updated
    annotation with the existing local annotation, preserving the local tag
    and anchoring status flags.
    
    This fixes a problem where Annotations would be shown as Orphans after
    an update was received via the WebSocket
    
     * When an annotation update is received, merge the current/new
       versions rather than removing the current version and replacing
       it with the new one.
    
     * Remove mutation of existing annotation in `loadAnnotations()`,
       since the reducer function is now responsible for merging changes
       and triggering UI updates
    1832a97c
root-thread.js 5.13 KB