Files
Sergio Costas 3a571c14f9 agentnotify: show the snap icon when autorefresh is done (#13486)
* agentnotify: show the snap icon when autorefresh is done

When an application has to be closed by the user to allow to do
and autorefresh, the notification has the application icon. But
when the autorefresh has been completed, the notification has
the snapcraft icon instead.

This MR fixes this. With it, the notification specifying that
the snap has been successfully refreshed and that it can be
relaunched shows the application's icon.

Fix https://warthogs.atlassian.net/browse/UDENG-2030

* Fix .desktop file name generation

* Use an heuristic to determine the desktop file

* Move all the logic to the user-space daemon

* Don't fail if ReadCurrentInfo fails

Also, really take the first icon found, and not the last one.

* Moved code into function and added tests

* Update usersession/agent/rest_api.go

Co-authored-by: Maciej Borzecki <maciek.borzecki@gmail.com>

* Update usersession/agent/rest_api.go

Co-authored-by: Maciej Borzecki <maciek.borzecki@gmail.com>

* Extra changes requested by reviewers

* Add extra test

* Extra changes requested

* Update usersession/agent/rest_api_test.go

Co-authored-by: Maciej Borzecki <maciek.borzecki@gmail.com>

* Some style patches

---------

Co-authored-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2024-02-16 08:44:56 +01:00
..