message: Fix switching accounts
diff: @@ -4,6 +4,8 @@ import { ActionType, getType } from 'typesafe-actions';
  import { DimStore } from './store-types';
  import { InventoryBuckets } from './inventory-buckets';
  import { DimItemInfo } from './dim-item-info';
  +import { setCurrentAccount } from '../accounts/actions';
  +import { AccountsAction } from '../accounts/reducer';
  // TODO: Should this be by account? Accounts need IDs
  export interface InventoryState {
  @@ -34,11 +36,16 @@ export const initialInventoryState: InventoryState = {
  itemInfos: {}
  };
  -export const inventory: Reducer<InventoryState, InventoryAction> = (
  +export const inventory: Reducer<InventoryState, InventoryAction | AccountsAction> = (
  state: InventoryState = initialInventoryState,
  - action: InventoryAction
  + action: InventoryAction | AccountsAction
  ) => {
  switch (action.type) {
  + // When the account changes, clear the inventory state
  + case getType(setCurrentAccount):
  + return {
  + ...initialInventoryState,
  + };
  case getType(actions.update):
  // TODO: we really want to decompose these, drive out all deep mutation
  // TODO: mark DimItem, DimStore properties as Readonly
  