Пример #1
0
		private async void OnViewProfile()
		{
			var profile = new Profile ();
			profile.Details = new ProfileDetails ();
			AutoMapper.CopyPropertyValues (_appManager.AccountManager.CurrentUser, profile);
			AutoMapper.CopyPropertyValues (_appManager.AccountManager.CurrentUser, profile.Details);

			var model = new UserDetailViewModel (_appManager, profile) {
				HasChatOption = false
			};
			await model.ShowAsync ();
		}
Пример #2
0
		private async void OnSelectUser(object userArg)
		{
			var user = userArg as UserViewModel;
			if (user == null)
			{
				throw new Exception ("Selected item was not a user detail view model");
			}

			//If the user is not us, go to their detail page
			if (user.UserId != _appManager.AccountManager.CurrentUser.UserId)
			{
				var fullMember = await _appManager.ChatManager.GetMemberDetails (user.UserId);
				var model = new UserDetailViewModel (_appManager, fullMember) {
					HasChatOption = true
				};
				await model.ShowAsync ();
			}
		}