We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

[Bug]notification only show once [answered]

asked 2015-09-25 09:21:12 +0300

BirdZhang gravatar image

If the application use org.nemomobile.notifications 1.0,the notification will only show at first time you publish

I had tested some apps like

https://github.com/sailfishos/sailfish-utilities ,

https://github.com/nodevel/harbour-hopscotch ,

and mine https://github.com/0312birdzhang/harbour-cnbeta

You can test it at "Settings->Application->Utilities",click "Restart Keyboard",wait 3 seconds,click "Restart Keyboard" again.No notification show.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by BirdZhang
close date 2015-10-02 15:15:31.281656

1 Answer

Sort by » oldest newest most voted
1

answered 2015-10-02 12:27:41 +0300

adekker gravatar image

The publish behaviour has changed (as the old one was not as it should have been). A notification.publish() needs a notification.close(), otherwise the ID is not updated, and the old message get updated without showing it.

Executing notification.close() before doing a notification.publish() solved it for me.

See also https://github.com/nemomobile/nemo-qml-plugin-notifications/issues/25

edit flag offensive delete publish link more

Comments

Thanks very much :)

BirdZhang ( 2015-10-02 15:14:44 +0300 )edit

Question tools

Follow
2 followers

Stats

Asked: 2015-09-25 09:21:12 +0300

Seen: 319 times

Last updated: Oct 02 '15