DiscoverTenerife
|
Class that the panel element that shows a new friendship invitation. More...
Public Member Functions | |
void | setData (newFriendData friendData) |
The constructor of the class. It stores the given newFriendData object, it sets the shown text as the display name of the user. More... | |
void | setPanel (GameObject panel) |
Setter of the panel_ property. More... | |
void | acceptFriend () |
This method should be called when the current user accepts the friendship invitation of the current user. If there is internet connection it calls the acceptFriend method of UserData class and it calls both downloadFriendData and writeUserData firebaseHandler class. If there is no internet connection it just shows an error message on a toastMessage. More... | |
void | refuseFriend () |
This method should be called when the current user denies the friendship invitation of the current user. If there is internet connection it calls the deleteInvitationByName method of UserData class and it calls writeUserData of firebaseHandler class. If there is no internet connection it just shows an error message on a toastMessage. More... | |
string | getUid () |
Getter of the user id property. More... | |
Private Member Functions | |
void | destroyAndAdvice () |
This method destroy this GameObject and it also calls the elementDeleted method of the newFriendInvitationPanel class. More... | |
Private Attributes | |
GameObject | toastMessageObject_ |
GameObject that references the toastMessage object that will shown the information to the user. More... | |
GameObject | displayName_ |
GameObject that has the text where the displayName will be shown. More... | |
GameObject | panel_ |
GameObject that references the panel that this GameObject is attached. More... | |
newFriendData | newFriendData_ |
Reference to a newFriendData object that contains all the information of the shown friendship invitation. More... | |
Class that the panel element that shows a new friendship invitation.
void newFriendInvitation.acceptFriend | ( | ) |
This method should be called when the current user accepts the friendship invitation of the current user. If there is internet connection it calls the acceptFriend method of UserData class and it calls both downloadFriendData and writeUserData firebaseHandler class. If there is no internet connection it just shows an error message on a toastMessage.
|
private |
This method destroy this GameObject and it also calls the elementDeleted method of the newFriendInvitationPanel class.
string newFriendInvitation.getUid | ( | ) |
Getter of the user id property.
string | that contains the user ID of the represented user. |
void newFriendInvitation.refuseFriend | ( | ) |
This method should be called when the current user denies the friendship invitation of the current user. If there is internet connection it calls the deleteInvitationByName method of UserData class and it calls writeUserData of firebaseHandler class. If there is no internet connection it just shows an error message on a toastMessage.
void newFriendInvitation.setData | ( | newFriendData | friendData | ) |
The constructor of the class. It stores the given newFriendData object, it sets the shown text as the display name of the user.
the | newFriendData object that contains all the information of the represented frienship invitation. |
void newFriendInvitation.setPanel | ( | GameObject | panel | ) |
Setter of the panel_ property.
GameObject | that contains the panel that this object is attached. |
|
private |
GameObject that has the text where the displayName will be shown.
|
private |
Reference to a newFriendData object that contains all the information of the shown friendship invitation.
|
private |
GameObject that references the panel that this GameObject is attached.
|
private |
GameObject that references the toastMessage object that will shown the information to the user.