-
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 |
---|---|---|
h | ||
scripts | ||
.hound.yml | ||
.jscsrc | ||
.jshintignore | ||
.jshintrc | ||
package.json |