• Randall Leeds's avatar
    Add a directive for tracking nested aggregates · 2e08adab
    Randall Leeds authored
    Rather than continuing to track the message counts in the thread
    controller, make a separate deep-count directive that exports a
    getter / setter from its controller that can be used to query and
    increment counters that bubble aggreggations up to any deep-count
    directive above.
    
    Instead of firing a `threadCollapse` event when threads collapse
    and canceling it from the annotation directive when the annotation
    is being edited, the deep-count directive is used to track the
    total number of messages in a thead, the number of matches found
    by the thread-filter directive, and the number of annotations that
    are being edited.
    
    Remove most of the injectables from the thread controller and handle
    more of the DOM-specific bits in the link function. The controller
    becomes even simpler, but the directive needs tests now.
    2e08adab
deepCount.coffee 2.16 KB