Rofication icon indicating copy to clipboard operation
Rofication copied to clipboard

Deleting notifications sometimes still show up when Rofi comes back

Open cvincent opened this issue 4 years ago • 1 comments

Almost certainly a race condition. Hitting Delete to remove a notification removes that notification and then shows the Rofi window again. But sometimes the notification I just deleted still appears in the list when the Rofi window reappears. In this situation, if I Esc out of Rofi and pop Rofication up again, the notification I deleted is no longer showing. This to me indicates a race condition.

A possible solution might be to save the ID of the most recently deleted notification, and always exclude that ID when showing the current list. This approach is optimistic that the notification system received and processed the delete request, but pessimistic that the operation completed by the time the Rofi UI was redisplayed.

cvincent avatar Nov 24 '20 05:11 cvincent

I think a fix is trivial to do, rofication-gui.py should not create a second connection to send the delete, but use the existing connection.. making sure it is serialized.

edit: looking at the code after many years, this thing needs to be rewritten :stuck_out_tongue_closed_eyes:

DaveDavenport avatar Nov 24 '20 08:11 DaveDavenport