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>
This commit is contained in:
Evan Welsh 2021-10-30 15:11:10 -07:00 committed by Florian Müllner
parent 2d6f4aabf9
commit 828da18b72

View File

@ -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?.();
});
}