Skip to content

Commit

Permalink
♻️ [useDebugManager] Better unlock state history
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Jan 27, 2024
1 parent 90f45ca commit 798b5c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/website/src/store/useDebugManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ type ErrorResponse = Parameters<ManagerEventMap['error']>[0];

const MAX_HISTORY_LENGTH = 44;

// TODO: Consider enabling a auto-suspension option.
// import {clamp, timeMeasurement} from '@earwurm/utilities';
// const safeAutoSuspend = clamp(0, autoSuspend, timeMeasurement.msPerMin);

const {manager, activeStacks} = useEarwurmStore();

const stateHistoryRef = ref([manager.state]);
Expand Down Expand Up @@ -37,10 +41,6 @@ manager.on('play', (active) => {
playHistoryRef.value = newPlayHistory.slice(MAX_HISTORY_LENGTH * -1);
});

manager.on('library', () => {
updateUnlockHistory();
});

manager.on('error', (response) => {
errorHistoryRef.value = [...errorHistoryRef.value, response];
});
Expand Down

0 comments on commit 798b5c8

Please sign in to comment.