private IEnumerator uploadNewComment(string newComment) { statusPanel.showLoadingStatus("Uploading Comment..."); ServerCall uploadCall = new ServerCall(ServerInteract.INSTANCE.AddCommentToGlyph(currentGlyph, newComment)); yield return(StartCoroutine(uploadCall.call())); if (uploadCall.ReturnException != null) { statusPanel.showErrorStatus(uploadCall.ReturnException.Message); throw uploadCall.ReturnException; } statusPanel.showStatus("Comment Uploaded!"); commentList.removeAllElements(); StartCoroutine(refreshCommentList()); writeCommentField.text = string.Empty; yield return(new WaitForSeconds(1.0f)); statusPanel.setStatusPanelVisible(false); yield return("Done"); }
private void onSearchFieldChange(string search) { if (!search.Equals(string.Empty)) { StartCoroutine(doSearch(search)); } else { currentSearchLock = new Object(); searchList.removeAllElements(); } }
private void refreshList() { searchList.removeAllElements(); foreach (User user in searchedUsers) { GameObject go = Instantiate(sharedWithItemPrefab); GlyphSharedWithListItem newItem = go.GetComponent <GlyphSharedWithListItem> (); newItem.statusPanel = statusPanel; newItem.SetGlyphShareValues(currentGlyph, user); searchList.addElement((ScrollableList.ListGameObject)newItem); } }
private void setListToAccepted() { friendsList.removeAllElements(); List <Friendship> accepted = LoggedInUser.GetLoggedInUser().GetAcceptedFriendships(); foreach (Friendship friend in accepted) { GameObject go = Instantiate(approvedFriendPrefab); AcceptedFriendListItem newItem = go.GetComponent <AcceptedFriendListItem> (); newItem.SetFriendship(friend); newItem.userProfile = userProfile; friendsList.addElement((ScrollableList.ListGameObject)newItem); Debug.LogError(friend.ToString()); } }