aboutsummaryrefslogtreecommitdiff
path: root/main/src/windows/preferences_window/account_preferences_subpage.vala
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/windows/preferences_window/account_preferences_subpage.vala')
-rw-r--r--main/src/windows/preferences_window/account_preferences_subpage.vala8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/windows/preferences_window/account_preferences_subpage.vala b/main/src/windows/preferences_window/account_preferences_subpage.vala
index 01cf5584..a1966e34 100644
--- a/main/src/windows/preferences_window/account_preferences_subpage.vala
+++ b/main/src/windows/preferences_window/account_preferences_subpage.vala
@@ -123,8 +123,14 @@ public class Dino.Ui.AccountPreferencesSubpage : Gtk.Box {
return true;
});
+ // Only show avatar removal button if an avatar is set
+ var avatar_model = model.selected_account.avatar_model.tiles.get_item(0) as ViewModel.AvatarPictureTileModel;
+ avatar_model.notify["image-file"].connect(() => {
+ remove_avatar_button.visible = avatar_model.image_file != null;
+ });
+ remove_avatar_button.visible = avatar_model.image_file != null;
+
model.selected_account.notify["connection-error"].connect(() => {
- // TODO doesn't work
if (model.selected_account.connection_error != null) {
connection_status.add_css_class("error");
} else {