mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-01 14:33:38 +00:00
Improve reliance on selector caching
This commit is contained in:
parent
756854eaec
commit
c75214dcd7
2 changed files with 3 additions and 2 deletions
|
|
@ -8,14 +8,14 @@ import { toggleWindow } from "../../actionCreators";
|
|||
const PlaylistToggleButton = props => (
|
||||
<div
|
||||
id="playlist-button"
|
||||
className={classnames({ selected: props.getWindowOpen("playlist") })}
|
||||
className={classnames({ selected: props.selected })}
|
||||
onClick={props.handleClick}
|
||||
title="Toggle Playlist Editor"
|
||||
/>
|
||||
);
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
getWindowOpen: getWindowOpen(state),
|
||||
selected: getWindowOpen(state)("playlist"),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = {
|
||||
|
|
|
|||
|
|
@ -461,6 +461,7 @@ export function getLlamaMode(state: AppState) {
|
|||
return state.display.llama;
|
||||
}
|
||||
|
||||
// TODO: This is poorly memoized. It invalidates when a window moves.
|
||||
export const getWindowSizes = createSelector(
|
||||
getGenWindows,
|
||||
getDoubled,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue