SnapDotNet.Apps.ViewModels.SignedIn.FriendsViewModel.ChangeDisplayName C# (CSharp) Method

ChangeDisplayName() private static method

private static ChangeDisplayName ( Friend friend ) : void
friend SnapDotNet.Core.Snapchat.Models.Friend
return void
		private static async void ChangeDisplayName(Friend friend)
		{
			await ProgressHelper.ShowStatusBar(App.Loader.GetString("StatusBarChangeDisplay"));

#if WINDOWS_PHONE_APP
			var contentDialog = new ChangeDisplayNameDialog(friend.FriendlyName);
			var result = await contentDialog.ShowAsync();
			if (result != ContentDialogResult.Primary) return;
			await App.SnapChatManager.Endpoints.ChangeFriendDisplayNameAsync(friend.Name, contentDialog.NewDisplayName);
			friend.DisplayName = contentDialog.NewDisplayName;
#else
			// TODO: Windows 8 App logic
#endif
			friend.NotifyPropertyChanged("DisplayName");
			friend.NotifyPropertyChanged("Name");
			friend.NotifyPropertyChanged("FriendlyName");
			
			await ProgressHelper.HideStatusBar();
			App.UpdateSnapchatData();
		}