ADD:: Alerts: username is now your friend and calculation saved.
This commit is contained in:
@@ -518,8 +518,9 @@ public class CalculatorController {
|
||||
Float footprint = userService.saveFootprint(userService.currentUser.getName());
|
||||
Window owner = saveButton.getScene().getWindow();
|
||||
Stage current = (Stage) owner;
|
||||
// CalculatorController.AlertHelper.showAlert(Alert.AlertType.CONFIRMATION, owner, "Footprint saved!", "Your footprint is saved!");
|
||||
current.close();
|
||||
controller.updateLeaderboard();
|
||||
CalculatorController.AlertHelper.showAlert
|
||||
(Alert.AlertType.CONFIRMATION, owner, "Footprint saved!", "Your footprint is saved!");
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,10 @@ public class FriendController {
|
||||
//add friend to the current user
|
||||
userService.addFriend(userService.currentUser.getName(), userNameText.getText());
|
||||
//close the register window after the user has entered all the credentials
|
||||
String friendName = userNameText.getText();
|
||||
Stage current = (Stage) owner;
|
||||
current.close();
|
||||
UserController.AlertHelper.showAlert(Alert.AlertType.CONFIRMATION, owner, "Friend added!",
|
||||
userNameText.getText() + " is now your friend!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user