Skip to content

Disconnecting from signals #171

Answered by Aylur
PoSayDone asked this question in Q&A
Discussion options

You must be logged in to vote

You seem to have defined two signals which you are not emitting, so I'll assume you want them to be props

If you want to be able to connect to notify::colors on this service, then fix the register call, and emit a notify.

Didn't actually test this, but it should work. The player-closed connection might be unnecessary, not sure, but just to be safe its there.

Note: the #prop is a js private member

import Service from 'resource:///com/github/Aylur/ags/service.js';
import Mpris, { MprisPlayer } from 'resource:///com/github/Aylur/ags/service/mpris.js';
import App from 'resource:///com/github/Aylur/ags/app.js';
import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';

class Mater…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PoSayDone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants