protected async void OnLoginButtonClicked(object sender, EventArgs e) { await mUserService.RefreshDataAsync(); User one = (User)BindingContext; User user = await mUserService.GetUser(one.Name, one.Password, one.Type); if (user != null) { //Console.WriteLine("Get User"); // Init the current user ID GlobalManager.Instance.CurrentUser = user; // Init the friends mUserService.InitFriends(); // Pop messagelist await mMessageService.RefreshDataAsync(user.ID); var messageListPage = new MessageListPage(); await Navigation.PushAsync(messageListPage); } }