aboutsummaryrefslogtreecommitdiff
path: root/main/src/windows/preferences_window
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2026-04-10 21:01:40 +0200
committerMarvin W <git@larma.de>2026-04-10 21:02:44 +0200
commit0baeaa2b8f481f60f8c7eecc856c48a11f211a20 (patch)
tree5e359a8e81228cf52fb783667761cebbb2f55ec2 /main/src/windows/preferences_window
parente1f38c674704de4380d885f579a0ceb81a4d3bb1 (diff)
Don't require adw_preferences_page_get_group
It's only available in Adwaita 1.8+
Diffstat (limited to 'main/src/windows/preferences_window')
-rw-r--r--main/src/windows/preferences_window/accounts_preferences_page.vala10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/src/windows/preferences_window/accounts_preferences_page.vala b/main/src/windows/preferences_window/accounts_preferences_page.vala
index 5703d430..75232158 100644
--- a/main/src/windows/preferences_window/accounts_preferences_page.vala
+++ b/main/src/windows/preferences_window/accounts_preferences_page.vala
@@ -7,7 +7,9 @@ public class Dino.Ui.PreferencesWindowAccounts : Adw.PreferencesPage {
private const string ACCOUNT_ROW_ACCOUNT = "DINO_ACCOUNT_ROW_ACCOUNT";
public signal void account_chosen(Account account);
- private bool refreshed_once = false;
+
+ private unowned Adw.PreferencesGroup active_accounts;
+ private unowned Adw.PreferencesGroup disabled_accounts;
public ViewModel.PreferencesDialog model { get; set; }
@@ -41,10 +43,8 @@ public class Dino.Ui.PreferencesWindowAccounts : Adw.PreferencesPage {
}
private void refresh() {
- if (refreshed_once) {
- this.remove(this.get_group(1));
- this.remove(this.get_group(0));
- }
+ if (active_accounts != null) this.remove(active_accounts);
+ if (disabled_accounts != null) this.remove(disabled_accounts);
Adw.PreferencesGroup active_accounts = new Adw.PreferencesGroup() { title=_("Accounts")};
Adw.PreferencesGroup disabled_accounts = new Adw.PreferencesGroup() { title=_("Disabled accounts")};