codeformat
This commit is contained in:
parent
e211d5a6bb
commit
809eb7132c
3 changed files with 9 additions and 13 deletions
|
|
@ -134,14 +134,10 @@ function UserPatterns({ context }) {
|
||||||
{/* {patternFilter === patternFilterName.user && ( */}
|
{/* {patternFilter === patternFilterName.user && ( */}
|
||||||
<PatternButtons
|
<PatternButtons
|
||||||
onClick={(id) => {
|
onClick={(id) => {
|
||||||
updateCodeWindow(
|
updateCodeWindow(context, { ...userPatterns[id], collection: userPattern.collection }, patternAutoStart);
|
||||||
context,
|
|
||||||
{ ...userPatterns[id], collection: userPattern.collection },
|
|
||||||
patternAutoStart,
|
|
||||||
)
|
|
||||||
|
|
||||||
if (context.started && activePattern === id) {
|
if (context.started && activePattern === id) {
|
||||||
context.handleEvaluate()
|
context.handleEvaluate();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
patterns={userPatterns}
|
patterns={userPatterns}
|
||||||
|
|
@ -197,11 +193,7 @@ function FeaturedPatterns({ context }) {
|
||||||
context={context}
|
context={context}
|
||||||
initialPage={featuredPageNum}
|
initialPage={featuredPageNum}
|
||||||
patternOnClick={(id) => {
|
patternOnClick={(id) => {
|
||||||
updateCodeWindow(
|
updateCodeWindow(context, { ...patterns[id], collection: patternFilterName.featured }, patternAutoStart);
|
||||||
context,
|
|
||||||
{ ...patterns[id], collection: patternFilterName.featured },
|
|
||||||
patternAutoStart,
|
|
||||||
);
|
|
||||||
}}
|
}}
|
||||||
paginationOnChange={async (pageNum) => {
|
paginationOnChange={async (pageNum) => {
|
||||||
await loadAndSetFeaturedPatterns(pageNum - 1);
|
await loadAndSetFeaturedPatterns(pageNum - 1);
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ export function SettingsTab({ started }) {
|
||||||
multiChannelOrbits,
|
multiChannelOrbits,
|
||||||
isTabIndentationEnabled,
|
isTabIndentationEnabled,
|
||||||
isMultiCursorEnabled,
|
isMultiCursorEnabled,
|
||||||
patternAutoStart
|
patternAutoStart,
|
||||||
} = useSettings();
|
} = useSettings();
|
||||||
const shouldAlwaysSync = isUdels();
|
const shouldAlwaysSync = isUdels();
|
||||||
const canChangeAudioDevice = AudioContext.prototype.setSinkId != null;
|
const canChangeAudioDevice = AudioContext.prototype.setSinkId != null;
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,11 @@ export function useSettings() {
|
||||||
isPanelOpen: parseBoolean(state.isPanelOpen),
|
isPanelOpen: parseBoolean(state.isPanelOpen),
|
||||||
userPatterns: userPatterns,
|
userPatterns: userPatterns,
|
||||||
multiChannelOrbits: parseBoolean(state.multiChannelOrbits),
|
multiChannelOrbits: parseBoolean(state.multiChannelOrbits),
|
||||||
patternAutoStart: isUdels() ? false : state.patternAutoStart === undefined ? true : parseBoolean(state.patternAutoStart)
|
patternAutoStart: isUdels()
|
||||||
|
? false
|
||||||
|
: state.patternAutoStart === undefined
|
||||||
|
? true
|
||||||
|
: parseBoolean(state.patternAutoStart),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue