From 654b8aaf60835cee72f760e38a9049ee7a11143d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Fri, 19 Nov 2021 18:43:01 +0100 Subject: [PATCH] prefs: Fix expander rows compat with latest libadwaita --- src/prefs.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/prefs.js b/src/prefs.js index a4acaa8f..55936236 100644 --- a/src/prefs.js +++ b/src/prefs.js @@ -440,8 +440,15 @@ class ClapperPrefsPluginExpander extends Adw.ExpanderRow const featuresNames = Object.keys(pluginsData[this.title]); debug(`Adding ${featuresNames.length} features to the list of plugin: ${this.title}`); - for(let featureObj of pluginsData[this.title]) - this.add(new PrefsPluginFeature(featureObj)); + for(let featureObj of pluginsData[this.title]) { + const prefsPluginFeature = new PrefsPluginFeature(featureObj); + + /* TODO: Remove old libadwaita compat */ + if(this.add_row) + this.add_row(prefsPluginFeature); + else + this.add(prefsPluginFeature); + } } });