Now this works using the gate-auto-refresh hook. When it is
received, the hook writes the file "pending-refresh" into the
SNAP_COMMON folder, where any snap-store instance can see it.
The snap-store executable checks it using GFile.Monitor(),
and if it does appear, it will show a notification in the snap
store window if this is visible, to inform the user that an
update is available and awaiting. But if the window isn't
visible, or it is closed, the application will exit, thus
allowing snapd to update it.
DT-779: Always show update notifications on startup (Core20)
Currently, snap-store remembers if it has shown a notification
for an specific update. This means that if the user closes the
notification, it won't be remembered that there are pending
updates.
This patch resets the timestamps during launch to ensure that,
after loging, the user will always be notified if there are
pending updates.
The autostart is enabled only when the "ubuntu-software" app
from the "snap-store" snap is run, but not if the "snap-store"
app is run. This was quite hidden because the icon in the dock
is for the "ubuntu-software" app.
This PR fixes this by setting the autostart for both apps.
Some users reported that the Snap Store crashes with a
segmentation fault. The bug was a double-free memory bug,
which, being on a GObject (which requires reading some
data in the memory block to be free before freeing it),
resulting in an invalid memory access.
This patch fixes it by compiling LIBXMLB directly instead
of relying on the other parts to download and compile it.
It also fixes the version to 0.3.9 and applies a patch for
the double-free bug.