Commit 5323b937 authored by Robert Knight's avatar Robert Knight

Move all state out of BrowserAction and into TabState

Make BrowserAction actually stateless - its responsibility
is just to map the logical H state of a tab (active/inactive/errored,
annotation count) to the badge state.

 * Convert the per-tab state stored in TabState from
   a string into an object so that we can store additional
   state, starting with the badge count.

 * Move the function for fetching the badge's annotation
   count and updating the H tab state into TabState.

   This decouples the presentation of the badge from
   the logic of making network requests and updating
   the model.
parent 51e00aa0
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
"extend": "^2.0.0", "extend": "^2.0.0",
"frame-rpc": "^1.3.1", "frame-rpc": "^1.3.1",
"hammerjs": "^2.0.4", "hammerjs": "^2.0.4",
"is-equal-shallow": "^0.1.3",
"jquery": "1.11.1", "jquery": "1.11.1",
"js-polyfills": "^0.1.11", "js-polyfills": "^0.1.11",
"moment": "^2.10.6", "moment": "^2.10.6",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment