Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
fix: only auto-start music if today is a meeting day
Browse files Browse the repository at this point in the history
  • Loading branch information
sircharlo committed Jun 20, 2024
1 parent c2c24d5 commit 1437082
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/media/MusicButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function playMusic() {
const meetingDay = ref(false);
onMounted(() => {
meetingDay.value = !!selectedDateObject.value?.meeting;
meetingDay.value = selectedDateObject.value?.today && !!selectedDateObject.value?.meeting;
if (currentSettings.value?.autoStartMusic && meetingDay.value) {
playMusic();
}
Expand Down
5 changes: 3 additions & 2 deletions src/helpers/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ function getLookupPeriod() {
meeting: isMwMeetingDay(dayDate)
? 'mw'
: isWeMeetingDay(dayDate)
? 'we'
: false,
? 'we'
: false,
today: datesAreSame(dayDate, new Date()),
};
}) as DateInfo[];
}
Expand Down
1 change: 1 addition & 0 deletions src/types/dates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export interface DateInfo {
dynamicMedia: DynamicMediaObject[];
loading: boolean;
meeting: boolean | string;
today: boolean;
}

0 comments on commit 1437082

Please sign in to comment.