[gnome-shell/gnome-3-24] background: Fix file check



commit 4e223880891f577c928d54663457f38f43f4f7fb
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Mar 30 17:56:30 2017 +0200

    background: Fix file check
    
    The _animationFile property was removed in commit 8a4c86263362c ...

 js/ui/background.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index fc27898..5f4ce0d 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -166,7 +166,8 @@ const BackgroundCache = new Lang.Class({
                                         settingsSchema: null,
                                         onLoaded: null });
 
-        if (this._animations[params.settingsSchema] && _fileEqual0(this._animationFile, params.file)) {
+        let animation = this._animations[params.settingsSchema];
+        if (animation && _fileEqual0(animation.file, params.file)) {
             if (params.onLoaded) {
                 let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
                     params.onLoaded(this._animations[params.settingsSchema]);
@@ -177,7 +178,7 @@ const BackgroundCache = new Lang.Class({
             return;
         }
 
-        let animation = new Animation({ file: params.file });
+        animation = new Animation({ file: params.file });
 
         animation.load(Lang.bind(this, function() {
                            this._animations[params.settingsSchema] = animation;


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