• Sean Hammond's avatar
    Don't change model.group on group change · 2f5b8bc1
    Sean Hammond authored
    Don't change model.group in AnnotationController when the currently focused
    group changes.
    
    model is supposed to be a read-only domain model, change vm.annotation instead.
    
    Changes to vm.annotation are copied over to model before saving model to the
    server.
    
    To make this work vm.group() should return the current group of the annotation,
    accounting for any changes made to vm.annotation but not saved to model or to
    the server yet. It should return vm.annotation.group not model.group.
    
    Similarly vm.isShared() should be based on vm.annotation not on model.
    
    Also remove some code in thread.coffee that was deliberately hiding new
    annotations that don't belong to the focused group (see commit
    272b2432c48a2d6bf890daa863e92f3a678b27b5). This is no longer the desired
    behaviour - when changing groups any new annotations move to the new group with
    us (and the GROUP_FOCUSED listener in AnnotationController will update
    vm.annotation.group to match).
    2f5b8bc1
Name
Last commit
Last update
..
test Loading commit data...
annotation.js Loading commit data...
deep-count.coffee Loading commit data...
dropdown-menu-btn.js Loading commit data...
excerpt.js Loading commit data...
form-input.coffee Loading commit data...
form-validate.coffee Loading commit data...
group-list.js Loading commit data...
h-autofocus.js Loading commit data...
markdown.coffee Loading commit data...
publish-annotation-btn.js Loading commit data...
search-status-bar.js Loading commit data...
share-dialog.coffee Loading commit data...
signin-control.js Loading commit data...
simple-search.coffee Loading commit data...
sort-dropdown.js Loading commit data...
spinner.js Loading commit data...
status-button.coffee Loading commit data...
thread-filter.coffee Loading commit data...
thread.coffee Loading commit data...
top-bar.js Loading commit data...
window-scroll.js Loading commit data...