Skip to content

Commit 4e62cc2

Browse files
author
Jonas Weidner
committed
Added auto refresh
1 parent 252a12e commit 4e62cc2

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ yarn electron:serve
2020
- [x] Include electron-builder
2121
- [x] App Icon
2222
- [x] Speaker IP settings
23-
- [ ] Mute
24-
- [ ] Check for status changes (volume, source ...)
23+
- [x] Check for status changes (volume, source ...)
24+
- [ ] Auto-updater
2525
- [ ] Release first bundled version
26+
- [ ] Mute button
2627
- [ ] Sound signature controls (In Progress, subwoofer controls already implemented)
2728
- [ ] Transform into menubar application
2829
- [ ] Search for speakers in network

‎src/App.vue‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,21 @@ export default Vue.extend({
5454
return {
5555
controller: {} as KefController,
5656
inputSource: InputSource.Off as InputSource,
57-
view: "playback" as "playback"|"dsp"|"settings"
57+
view: "playback" as "playback"|"dsp"|"settings",
58+
refreshInterval: null! as any
5859
};
5960
},
6061
async beforeDestroy() {
62+
clearInterval(this.refreshInterval);
63+
this.refreshInterval = null;
6164
await this.controller.closeConnection();
6265
},
6366
async mounted() {
6467
document.body.setAttribute("vs-theme", "dark");
6568
setTimeout(async () => {
6669
this.controller = new KefController();
6770
this.fetchSpeakerData();
71+
this.refreshInterval = setInterval(this.fetchSpeakerData, 10000);
6872
}, 200);
6973
},
7074
methods: {

0 commit comments

Comments
 (0)