From 82e0729350b296e8255c6515613a2192f13a7adb Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Sun, 1 Dec 2024 18:33:55 -0800 Subject: [PATCH] refactor: don't send `requestSinks` command at connect Sinks are sent at connect time and updated as necessary, so drop the request command. --- installed-tests/suites/plugins/testSystemvolumePlugin.js | 9 +-------- src/service/plugins/systemvolume.js | 6 ------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/installed-tests/suites/plugins/testSystemvolumePlugin.js b/installed-tests/suites/plugins/testSystemvolumePlugin.js index 22440c7c2..0ead146fe 100644 --- a/installed-tests/suites/plugins/testSystemvolumePlugin.js +++ b/installed-tests/suites/plugins/testSystemvolumePlugin.js @@ -48,6 +48,7 @@ describe('The systemvolume plugin', function () { }, }); testRig.setPaired(true); + testRig.setConnected(true); remoteDevice = testRig.remoteDevice; remoteDevice.handlePacket = handlePacket.bind(remoteDevice); @@ -70,14 +71,6 @@ describe('The systemvolume plugin', function () { expect(localPlugin).toBeDefined(); }); - it('sends streams when connected', function () { - spyOn(localPlugin, '_sendSinkList'); - - testRig.setConnected(true); - - expect(localPlugin._sendSinkList).toHaveBeenCalled(); - }); - it('sends a list of streams when requested', async function () { spyOn(remoteDevice, 'handlePacket').and.callThrough(); diff --git a/src/service/plugins/systemvolume.js b/src/service/plugins/systemvolume.js index 9db02d1df..f688d61a8 100644 --- a/src/service/plugins/systemvolume.js +++ b/src/service/plugins/systemvolume.js @@ -73,12 +73,6 @@ const SystemVolumePlugin = GObject.registerClass({ } } - connected() { - super.connected(); - - this._sendSinkList(); - } - /** * Handle a request to change an output *