Class ProfileSettingsController
- java.lang.Object
-
- com.cmput301w23t09.qrhunter.profile.ProfileSettingsController
-
public class ProfileSettingsController extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ProfileSettingsController(GameController gameController, java.util.UUID deviceUUID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrequestPlayerData(java.util.function.Consumer<Player> callback)Request the player of this settings page.voidreturnToProfile()Returns to the profile fragmentvoidsaveChanges(java.lang.String email, java.lang.String phoneNo, java.util.function.Consumer<java.lang.Boolean> callback)Saves the changes of the player's new contact details.
-
-
-
Constructor Detail
-
ProfileSettingsController
public ProfileSettingsController(GameController gameController, java.util.UUID deviceUUID)
-
-
Method Detail
-
saveChanges
public void saveChanges(java.lang.String email, java.lang.String phoneNo, java.util.function.Consumer<java.lang.Boolean> callback)Saves the changes of the player's new contact details. It is assumed that the email and phone number are valid.- Parameters:
email- the new emailphoneNo- the new phone numbercallback- callback to call on completion or failure. True if completed successfully.
-
returnToProfile
public void returnToProfile()
Returns to the profile fragment
-
requestPlayerData
public void requestPlayerData(java.util.function.Consumer<Player> callback)
Request the player of this settings page.- Parameters:
callback- callback to call with the player or null if an exception occurred while fetching the player.
-
-