dd97a2589b
There are few places where we want to perform an action when no more messages are present. Create a function that covers this use case and use it. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2412>