Skip to content

Commit

Permalink
Update audio_window.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kemzops committed Mar 15, 2023
1 parent a30b91f commit eaf78c3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/preload/audio_window.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ window.addEventListener('DOMContentLoaded', async (e) => {

while (true) {

await new Promise(resolve => setTimeout(resolve, 25000));
await new Promise(resolve => setTimeout(resolve, 20000));
let audioJson = fs.readJsonSync(path.join(App_Path, './data/audio_window.json'));
let location = fs.readJsonSync(path.join(App_Path, './data/location.json'));
let settings = fs.readJsonSync(path.join(App_Path, './data/settings.json'));
Expand All @@ -51,7 +51,7 @@ window.addEventListener('DOMContentLoaded', async (e) => {
document.getElementById('audio').volume = settings?.adhanVolume || 1;
setTimeout(() => {
audioBoolean(App_Path, false)
}, 60000);
}, 65000);
}

else if (time_now_adhan === data.dhuhr && audioJson?.start === false && settings?.notifications_adhan) {
Expand All @@ -62,7 +62,7 @@ window.addEventListener('DOMContentLoaded', async (e) => {
document.getElementById('audio').volume = settings?.adhanVolume || 1;
setTimeout(() => {
audioBoolean(App_Path, false);
}, 60000);
}, 65000);
}

else if (time_now_adhan === data.asr && audioJson?.start === false && settings?.notifications_adhan) {
Expand All @@ -73,7 +73,7 @@ window.addEventListener('DOMContentLoaded', async (e) => {
document.getElementById('audio').volume = settings?.adhanVolume || 1;
setTimeout(() => {
audioBoolean(App_Path, false);
}, 60000);
}, 65000);
}

else if (time_now_adhan === data.maghrib && audioJson?.start === false && settings?.notifications_adhan) {
Expand All @@ -84,7 +84,7 @@ window.addEventListener('DOMContentLoaded', async (e) => {
document.getElementById('audio').volume = settings?.adhanVolume || 1;
setTimeout(() => {
audioBoolean(App_Path, false);
}, 60000);
}, 65000);
}

else if (time_now_adhan === data.isha && audioJson?.start === false && settings?.notifications_adhan) {
Expand All @@ -95,7 +95,7 @@ window.addEventListener('DOMContentLoaded', async (e) => {
document.getElementById('audio').volume = settings?.adhanVolume || 1;
setTimeout(() => {
audioBoolean(App_Path, false);
}, 60000);
}, 65000);
}

else if (time_now_adhkar === settings?.morning_adhkar_time && audioJson?.start === false && settings?.notifications_adhkar) {
Expand All @@ -106,7 +106,7 @@ window.addEventListener('DOMContentLoaded', async (e) => {
document.getElementById('audio').volume = settings?.adhanVolume || 1;
setTimeout(() => {
audioBoolean(App_Path, false);
}, 60000);
}, 65000);
}

else if (time_now_adhkar === settings?.evening_adhkar_time && audioJson?.start === false && settings?.notifications_adhkar) {
Expand All @@ -117,7 +117,7 @@ window.addEventListener('DOMContentLoaded', async (e) => {
document.getElementById('audio').volume = settings?.adhanVolume || 1;
setTimeout(() => {
audioBoolean(App_Path, false);
}, 60000);
}, 65000);
}

}
Expand Down

0 comments on commit eaf78c3

Please sign in to comment.