Preferences: Remove now useless dummy page

This commit is contained in:
Romain Vigier
2024-09-18 18:28:27 +02:00
parent 838af405af
commit e20014eb82
-8
View File
@@ -3,7 +3,6 @@
'use strict';
import Adw from 'gi://Adw';
import Gdk from 'gi://Gdk';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
@@ -32,10 +31,6 @@ export default class NightThemeSwitcherPreferences extends ExtensionPreferences
window.search_enabled = true;
window.set_default_size(500, 630);
// Add a dummy page until the dynamics imports are done
const dummyPage = new Adw.PreferencesPage();
window.add(dummyPage);
// Dynamically import all classes
const { BackgroundButton } = await import('./preferences/BackgroundButton.js');
const { BackgroundsPage } = await import('./preferences/BackgroundsPage.js');
@@ -54,9 +49,6 @@ export default class NightThemeSwitcherPreferences extends ExtensionPreferences
GObject.type_ensure(ShortcutButton);
GObject.type_ensure(TimeChooser);
// Remove the dummy page
window.remove(dummyPage);
// Add all pages
[
new SchedulePage({ settings: this.getSettings(`${this.metadata['settings-schema']}.time`) }),