• Sean Hammond's avatar
    Set group and visibility of reply to that of parent · 6fe1e357
    Sean Hammond authored
    Set the group and visibility of replies to that of their parents, when
    replies are first created.
    
    Also prevent the visibility setting of a reply from overwriting the
    cached-in-local-storage visibility level. This prevents the following
    problem:
    
    - I'm annotating publicly (my cached-in-local-storage visibility
      setting is public)
    - I reply to a private annotation
    - The visibility of my reply is set to that of its parent, private
    - This visibility is then cached in local storage
    - I make a new top-level annotation, and now it's defaulting to private
      instead of public, even though the user never did anything to change
      the visibility from public to private, it was done automatically
      because they replied to a private annotation.
    
    Obviously changing the mode from private to public when replying to a
    public annotation was also possible.
    
    This means that if the user _does_ change the visibility of a reply, we
    _don't_ cache that either:
    
    - I'm annotating publicly (my cached-in-local-storage visibility
      setting is public)
    - I reply to a public annotation
    - The visibility of my reply is set to that of its parent, public
    - This visibility is not cached in local storage because it's a reply
      (and the value cached in the local storage is already the same anyway)
    - I then deliberately change the visibility of my reply from public to
      private
    - Again this visibility is not cached in local storage because it's a reply
    - The next time I make a new top-level annotation, it will still be
      defaulting to public, will not have changed to private mode
    6fe1e357
Name
Last commit
Last update
..
test Loading commit data...
annotation.coffee 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...
markdown.coffee Loading commit data...
match.coffee Loading commit data...
publish-annotation-btn.js Loading commit data...
search-status-bar.js Loading commit data...
share-dialog.coffee 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...
tab-reveal.coffee Loading commit data...
tabbable.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...