From 384bcd7a9660157690206fee4ba4875c2e51e378 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 10 Apr 2017 20:30:32 +0200 Subject: [PATCH] =?UTF-8?q?r=C3=A9-=C3=A9criture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserProfile/UserProfileViewModel.cs | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs b/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs index b2a73672..f6e53a27 100644 --- a/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs +++ b/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs @@ -15,6 +15,14 @@ namespace ZicMoove.ViewModels.UserProfile public class UserProfileViewModel : ViewModel { + public UserProfileViewModel() + { + Accounts = MainSettings.AccountList; + User = MainSettings.CurrentUser; + UpdateUserMeta(); + Rating = 2; + MainSettings.UserChanged += MainSettings_UserChanged; + } public bool IsAPerformer { @@ -26,7 +34,7 @@ namespace ZicMoove.ViewModels.UserProfile get; set; } // TODO implementation - int rating ; + int rating = 0 ; public int Rating { get @@ -136,22 +144,7 @@ namespace ZicMoove.ViewModels.UserProfile } } - public UserProfileViewModel() - { - Accounts = MainSettings.AccountList; - User = MainSettings.CurrentUser; - UpdateUserMeta(); - Rating = 2; - UserNameGesture = new RelayGesture((g, x) => - { - if (g.GestureType == GestureType.LongPress) - { - NavigationService.NavigateTo("accountChooser"); - } - }); - MainSettings.UserChanged += MainSettings_UserChanged; - - } + private void MainSettings_UserChanged(object sender, System.EventArgs e) {