Manos Chorianopoulos

fix pacing goal reached popup

......@@ -3987,7 +3987,7 @@ public class swiftApi {
}
}
public var _msg: Bool {
public var _msg: String {
get { // getter
return self.msg
}
......@@ -4181,8 +4181,9 @@ public class swiftApi {
let tempPacingDetails = PacingDetails(dictionary: pacingDataResult)
if (tempPacingDetails._meters._month._value >= tempPacingDetails._meters._month._goal) {
self.pacingGoalDialog(controller)
// if (tempPacingDetails._meters._month._value >= tempPacingDetails._meters._month._goal) {
if (tempPacingDetails._goal_reached == true) {
self.pacingGoalDialog(controller, tempPacingDetails._msg)
}
getPacingDetailsCallback(tempPacingDetails);
......@@ -4201,9 +4202,9 @@ public class swiftApi {
}
func pacingGoalDialog(_ controller: UIViewController) -> Void {
func pacingGoalDialog(_ controller: UIViewController, _ alertTitle: String) -> Void {
let alert = UIAlertController(title: "Συγχαρητήρια!", message: "Πέτυχες το στόχο του μήνα! Διάλεξε το δώρο που επιθυμείς να ενεργοποιήσεις!", preferredStyle: .alert)
let alert = UIAlertController(title: "Συγχαρητήρια!", message: alertTitle, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in
switch action.style{
case .default:
......