• Robert Knight's avatar
    Fix group focus change checks · 8a05a367
    Robert Knight authored
    The focused group change check had several issues:
    
     - The `prevFocused` variable was not updated after the focused group
       changed, so the `GROUP_FOCUSED` event was emitted every time the app
       state changed.
    
     - Groups were compared by reference rather than by ID, which means that
       a change which modified a property of the group but not its ID would
       cause the event to fire.
    
    The first issue made it impossible to create annotations because the
    unnecessary `GROUP_FOCUSED` event triggered a cascade of reactions which
    crashed the app.
    8a05a367
groups.js 2.05 KB