From dd983e5de1e28218329854b1033dcd2b848229bf Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 5 Jun 2022 11:45:13 +0300 Subject: [PATCH] prefs: move external filter tree onload method (which checks for inactive feeds, etc.) to FilterTree class --- classes/pref/feeds.php | 4 ---- js/PrefFeedTree.js | 10 ++++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index b90ce49b4..03b70580b 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -983,10 +983,6 @@ class Pref_Feeds extends Handler_Protected { dijit.byId('feedTree').editCategory(bare_id, item); } - diff --git a/js/PrefFeedTree.js b/js/PrefFeedTree.js index 013c01262..0585173c9 100644 --- a/js/PrefFeedTree.js +++ b/js/PrefFeedTree.js @@ -5,6 +5,16 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b function (declare, domConstruct, checkBoxTree, array, cookie) { return declare("fox.PrefFeedTree", lib.CheckBoxTree, { + postCreate: function() { + this.inherited(arguments); + + const tmph = dojo.connect(this, 'onLoad', () => { + dojo.disconnect(tmph); + + this.checkInactiveFeeds(); + this.checkErrorFeeds(); + }); + }, // save state in localStorage instead of cookies // reference: https://stackoverflow.com/a/27968996 _saveExpandedNodes: function(){