Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libngf-qt] Avoid emitting playing state twice. #6

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

dcaliste
Copy link
Contributor

When calling the "play" method over DBus, if the
DBus reply is positive, the "playing" state is
emitted. Then the ngf daemon is emitting a state
change to "playing" which is transmitted by the
client. This commit is avoiding to transmit this
latter "playing" state in the normal case.

If the daemon is unable to play the effect, then
the "playing" signal is emitted (because the DBus
call succeed) and is then followed by a "failed"
signal, thanks to the state change broadcasted by
ngfd. This commit is not changing this behaviour.

@pvuorela, this is fixing the played twice that we've seen in the harbour-ding reproducer. As explained in the commit message, I chose to keep the "playing" signal emission in the DBus reply, even if it happens that the effect does not exist for instance. To keep the "playing" -> "failed" workflow.

When calling the "play" method over DBus, if the
DBus reply is positive, the "playing" state is
emitted. Then the ngf daemon is emitting a state
change to "playing" which is transmitted by the
client. This commit is avoiding to transmit this
latter "playing" state in the normal case.

If the daemon is unable to play the effect, then
the "playing" signal is emitted (because the DBus
call succeed) and is then followed by a "failed"
signal, thanks to the state change broadcasted by
ngfd. This commit is not changing this behaviour.
@pvuorela pvuorela merged commit e62f739 into sailfishos:master Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants