Simplify tab counts calculation and move into a separate module
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.
Showing
Please register or sign in to comment