Skip to content

Commit

Permalink
refactor(systemvolume): remove requestSinks
Browse files Browse the repository at this point in the history
Sinks are sent at connect time and updated as necessary, so drop
the request command.

See: https://invent.kde.org/network/kdeconnect-meta/-/merge_requests/8
  • Loading branch information
andyholmes committed Nov 14, 2024
1 parent 734ef1e commit d60fdba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
17 changes: 0 additions & 17 deletions installed-tests/suites/plugins/testSystemvolumePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,6 @@ describe('The systemvolume plugin', function () {
expect(localPlugin._sendSinkList).toHaveBeenCalled();
});

it('sends a list of streams when requested', async function () {
spyOn(remoteDevice, 'handlePacket').and.callThrough();

remoteDevice.sendPacket({
type: 'kdeconnect.systemvolume.request',
body: {
requestSinks: true,
},
});

await localPlugin.awaitPacket('kdeconnect.systemvolume.request', {
requestSinks: true,
});

await remoteDevice.awaitPacket('kdeconnect.systemvolume');
});

it('handles volume level requests', async function () {
remoteDevice.sendPacket({
type: 'kdeconnect.systemvolume.request',
Expand Down
4 changes: 0 additions & 4 deletions src/service/plugins/systemvolume.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ const SystemVolumePlugin = GObject.registerClass({

handlePacket(packet) {
switch (true) {
case packet.body.hasOwnProperty('requestSinks'):
this._sendSinkList();
break;

case packet.body.hasOwnProperty('name'):
this._changeSink(packet);
break;
Expand Down

0 comments on commit d60fdba

Please sign in to comment.