From 5bb8a75169aaba03fed94f5e13d766483d02cafc Mon Sep 17 00:00:00 2001 From: Max Mannstein Date: Mon, 27 Oct 2025 18:18:02 +0100 Subject: [PATCH] Refactor saving state handling in Dog and Profile view models; update application version to 1.283; comment out unused buttons in DogAdd and DogUpdate views for cleaner code. --- .../gehGassiApp/Controls/ShellTitleViewNoLogoControl.xaml | 2 +- gehGassiApp/gehGassiApp/ViewModels/Dogs/DogAddViewModel.cs | 2 ++ gehGassiApp/gehGassiApp/ViewModels/Dogs/DogUpdateViewModel.cs | 2 ++ gehGassiApp/gehGassiApp/ViewModels/ProfileViewModel.cs | 2 ++ gehGassiApp/gehGassiApp/ViewModels/ProfileWalkerViewModel.cs | 2 ++ gehGassiApp/gehGassiApp/Views/Dogs/DogAddView.xaml | 4 ++-- gehGassiApp/gehGassiApp/Views/Dogs/DogUpdateView.xaml | 4 ++-- gehGassiApp/gehGassiApp/gehGassiApp.csproj | 4 ++-- 8 files changed, 15 insertions(+), 7 deletions(-) diff --git a/gehGassiApp/gehGassiApp/Controls/ShellTitleViewNoLogoControl.xaml b/gehGassiApp/gehGassiApp/Controls/ShellTitleViewNoLogoControl.xaml index 62a7c08..ed69ab3 100644 --- a/gehGassiApp/gehGassiApp/Controls/ShellTitleViewNoLogoControl.xaml +++ b/gehGassiApp/gehGassiApp/Controls/ShellTitleViewNoLogoControl.xaml @@ -8,7 +8,7 @@ x:Class="gehGassiApp.Controls.ShellTitleViewNoLogoControl"> - + diff --git a/gehGassiApp/gehGassiApp/ViewModels/Dogs/DogAddViewModel.cs b/gehGassiApp/gehGassiApp/ViewModels/Dogs/DogAddViewModel.cs index 0953646..3c2619d 100644 --- a/gehGassiApp/gehGassiApp/ViewModels/Dogs/DogAddViewModel.cs +++ b/gehGassiApp/gehGassiApp/ViewModels/Dogs/DogAddViewModel.cs @@ -453,6 +453,7 @@ namespace gehGassiApp.ViewModels.Dogs return; } + IsSaving = true; IsNewPhoto = true; var extension = ".png"; @@ -500,6 +501,7 @@ namespace gehGassiApp.ViewModels.Dogs PhotoPath = newFile; Dog.Photo = PhotoPath; + IsSaving = false; } diff --git a/gehGassiApp/gehGassiApp/ViewModels/Dogs/DogUpdateViewModel.cs b/gehGassiApp/gehGassiApp/ViewModels/Dogs/DogUpdateViewModel.cs index 5f73f00..f365cdb 100644 --- a/gehGassiApp/gehGassiApp/ViewModels/Dogs/DogUpdateViewModel.cs +++ b/gehGassiApp/gehGassiApp/ViewModels/Dogs/DogUpdateViewModel.cs @@ -454,6 +454,7 @@ namespace gehGassiApp.ViewModels.Dogs return; } + IsSaving = true; IsNewPhoto = true; var extension = ".png"; @@ -501,6 +502,7 @@ namespace gehGassiApp.ViewModels.Dogs PhotoPath = newFile; Dog.Photo = PhotoPath; + IsSaving = false; } diff --git a/gehGassiApp/gehGassiApp/ViewModels/ProfileViewModel.cs b/gehGassiApp/gehGassiApp/ViewModels/ProfileViewModel.cs index 79ace36..36f790d 100644 --- a/gehGassiApp/gehGassiApp/ViewModels/ProfileViewModel.cs +++ b/gehGassiApp/gehGassiApp/ViewModels/ProfileViewModel.cs @@ -772,6 +772,7 @@ namespace gehGassiApp.ViewModels return; } + IsSaving = true; IsNewPhoto = true; var extension = ".png"; @@ -819,6 +820,7 @@ namespace gehGassiApp.ViewModels PhotoPath = newFile; AppUser.Photo = PhotoPath; + IsSaving = false; } diff --git a/gehGassiApp/gehGassiApp/ViewModels/ProfileWalkerViewModel.cs b/gehGassiApp/gehGassiApp/ViewModels/ProfileWalkerViewModel.cs index cb49ada..070815c 100644 --- a/gehGassiApp/gehGassiApp/ViewModels/ProfileWalkerViewModel.cs +++ b/gehGassiApp/gehGassiApp/ViewModels/ProfileWalkerViewModel.cs @@ -961,6 +961,7 @@ namespace gehGassiApp.ViewModels return; } + IsSaving = true; IsNewPhoto = true; var extension = ".png"; @@ -1008,6 +1009,7 @@ namespace gehGassiApp.ViewModels PhotoPath = newFile; AppUser.Photo = PhotoPath; + IsSaving = false; } diff --git a/gehGassiApp/gehGassiApp/Views/Dogs/DogAddView.xaml b/gehGassiApp/gehGassiApp/Views/Dogs/DogAddView.xaml index a24748e..c704064 100644 --- a/gehGassiApp/gehGassiApp/Views/Dogs/DogAddView.xaml +++ b/gehGassiApp/gehGassiApp/Views/Dogs/DogAddView.xaml @@ -85,7 +85,7 @@ - + -->