Manos Chorianopoulos

add sharing popups dynamic texts

......@@ -2847,10 +2847,10 @@ public class swiftApi {
}
} else if (sharingData?._status_outer == 4) {
self.errorExpiredDialog(controller)
self.errorExpiredDialog(controller, sharingData?._msg ?? "")
} else if (sharingData?._status_outer == 5) {
self.errorUsedDialog(controller)
self.errorUsedDialog(controller, sharingData?._msg ?? "")
}
}
} else { // status != 1
......@@ -3033,9 +3033,9 @@ public class swiftApi {
controller.present(alert, animated: true, completion: nil)
}
func errorExpiredDialog(_ controller: UIViewController) -> Void {
func errorExpiredDialog(_ 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:
......@@ -3052,9 +3052,9 @@ public class swiftApi {
controller.present(alert, animated: true, completion: nil)
}
func errorUsedDialog(_ controller: UIViewController) -> Void {
func errorUsedDialog(_ 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:
......