[gnome-shell] background: Don't override synchronous load() with an async version



commit 828da18b72c75ecd27c6aaaeadbcde8ab00590a2
Author: Evan Welsh <contact evanwelsh com>
Date:   Sat Oct 30 15:11:10 2021 -0700

    background: Don't override synchronous load() with an async version
    
    Instead, override the asynchronous version to avoid conflicting with
    the parent signature.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2040>

 js/ui/background.js | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 1f7c5e5720..1ddb9d6f3d 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -177,7 +177,7 @@ var BackgroundCache = class BackgroundCache {
 
         animation = new Animation({ file: params.file });
 
-        animation.load(() => {
+        animation.load_async(null, () => {
             this._animations[params.settingsSchema] = animation;
 
             if (params.onLoaded) {
@@ -634,11 +634,12 @@ class Animation extends GnomeDesktop.BGSlideShow {
         this.loaded = false;
     }
 
-    load(callback) {
-        this.load_async(null, () => {
+    // eslint-disable-next-line camelcase
+    load_async(cancellable, callback) {
+        super.load_async(cancellable, () => {
             this.loaded = true;
-            if (callback)
-                callback();
+
+            callback?.();
         });
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]