Handle removing containers to refresh menus and remove assignments. Fixes: #761, Fixes: #752

This commit is contained in:
Jonathan Kingston
2017-08-28 21:35:02 -07:00
parent 3cc40344af
commit b6a98fb83e
2 changed files with 13 additions and 7 deletions
@@ -75,6 +75,13 @@ const messageHandler = {
return response;
});
if (browser.contextualIdentities.onRemoved) {
browser.contextualIdentities.onRemoved.addListener(({contextualIdentity}) => {
const userContextId = backgroundLogic.getUserContextIdFromCookieStoreId(contextualIdentity.cookieStoreId);
backgroundLogic.deleteContainer(userContextId, true);
});
}
// Handles messages from sdk code
const port = browser.runtime.connect();
port.onMessage.addListener(m => {