Make debug data a selector

This commit is contained in:
Jordan Eldredge 2018-10-17 19:03:25 -07:00
parent f2e317bf5b
commit b4b8e3cfbf
2 changed files with 15 additions and 10 deletions

View file

@ -14,6 +14,7 @@ import internetArchive from "../skins/Internet-Archive.wsz";
import MilkdropWindow from "./components/MilkdropWindow";
import screenshotInitialState from "./screenshotInitialState";
import { WINDOWS } from "./constants";
import * as Selectors from "./selectors";
import WebampLazy from "./webampLazy";
import enableMediaSession from "./mediaSession";
@ -135,16 +136,7 @@ Raven.config(SENTRY_DSN, {
const ravenMiddleware = createMiddleware(Raven, {
filterBreadcrumbActions,
stateTransformer: state => ({
...state,
display: {
...state.display,
skinGenLetterWidths: "[[REDACTED]]",
skinImages: "[[REDACTED]]",
skinCursors: "[[REDACTED]]",
skinRegion: "[[REDACTED]]"
}
})
stateTransformer: Selectors.getDebugData
});
// Don't prompt user to install Webamp. It's probably not

View file

@ -538,3 +538,16 @@ export const getMarqueeText = (state: AppState): string => {
}
return defaultText;
};
export function getDebugData(state: AppState) {
return {
...state,
display: {
...state.display,
skinGenLetterWidths: "[[REDACTED]]",
skinImages: "[[REDACTED]]",
skinCursors: "[[REDACTED]]",
skinRegion: "[[REDACTED]]"
}
};
}