[gnome-shell/wip/rstrode/login-screen-extensions: 56/134] extensionSystem: Periodically check for extension updates
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/login-screen-extensions: 56/134] extensionSystem: Periodically check for extension updates
- Date: Thu, 26 Aug 2021 19:30:59 +0000 (UTC)
commit 8dff8b63e2bb8975e1cee7e494c4c8f42dfafa8d
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Jan 27 00:59:19 2020 +0100
extensionSystem: Periodically check for extension updates
Now that we can download, apply and display extension updates, it is time
to actually check for updates. Schedule an update check right on startup,
then every 24 hours.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
js/ui/extensionSystem.js | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index 805e08caea..914abb3095 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -3,6 +3,7 @@
const { GLib, Gio, GObject, St } = imports.gi;
const Signals = imports.signals;
+const ExtensionDownloader = imports.ui.extensionDownloader;
const ExtensionUtils = imports.misc.extensionUtils;
const FileUtils = imports.misc.fileUtils;
const Main = imports.ui.main;
@@ -14,6 +15,8 @@ const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
const DISABLE_USER_EXTENSIONS_KEY = 'disable-user-extensions';
const EXTENSION_DISABLE_VERSION_CHECK_KEY = 'disable-extension-version-validation';
+const UPDATE_CHECK_TIMEOUT = 24 * 60 * 60; // 1 day in seconds
+
var ExtensionManager = class {
constructor() {
this._initted = false;
@@ -30,6 +33,12 @@ var ExtensionManager = class {
init() {
this._installExtensionUpdates();
this._sessionUpdated();
+
+ GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, UPDATE_CHECK_TIMEOUT, () => {
+ ExtensionDownloader.checkForUpdates();
+ return GLib.SOURCE_CONTINUE;
+ });
+ ExtensionDownloader.checkForUpdates();
}
lookup(uuid) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]