• Robert Knight's avatar
    Simplify tab counts calculation and move into a separate module · 8977ca5f
    Robert Knight authored
    Refactor some repetition in the functions that produced the counts for
    the Annotations, Page Notes and Orphans tabs and extract it into a
    separate module where it is easier to test.
    
    Moving this into a single function also makes it easier to memoize
    later, so we can avoid recalculating it when the list of annotations has
    not changed between two app states.
    8977ca5f
widget-controller.js 14 KB