mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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:
parent
2d6f4aabf9
commit
828da18b72
1 changed files with 6 additions and 5 deletions
|
|
@ -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?.();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue