Skip to content

Commit

Permalink
Change music logic
Browse files Browse the repository at this point in the history
  • Loading branch information
chenditc committed Jun 27, 2022
1 parent b70b8cf commit 841e8e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/BackgroundPlayers/PlayerWithStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ export function PlayerWithStatus(props) {
return (<></>)
}

var shouldPlay = true;
if (props.focus && props.overTime) {
shouldPlay = false;
}
if (!props.focus && !props.overTime) {
shouldPlay = false;
var shouldPlay = false;
if (props.focus && !props.overTime) {
shouldPlay = true;
}

const playerStatusClassName = css`
Expand Down
1 change: 1 addition & 0 deletions src/PeriodicChecks/HealthMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function HealthMonitor(props) {
const [overTime, setOverTime] = useState(false);

function getDefaultTimeSlot(detected = true, startTime = null) {
console.log(new Date(), "Added new session: detected:", detected, "startTime", startTime);
const usedStateTime = startTime ? startTime : new Date().toJSON();
const timePeriod = Math.floor((new Date() - new Date(usedStateTime)) / 1000);
return {
Expand Down

0 comments on commit 841e8e0

Please sign in to comment.