Showing
1 changed file
with
8 additions
and
4 deletions
... | @@ -137,9 +137,9 @@ import SwiftEventBus | ... | @@ -137,9 +137,9 @@ import SwiftEventBus |
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
140 | - func showConfirmDialog() -> Void { | 140 | + func showConfirmDialog(_ numberArg: String) -> Void { |
141 | 141 | ||
142 | - let alert = UIAlertController(title: "Ενεργοποίηση υπηρεσίας", message: "Θέλετε να γίνει ενεργοποίηση στο Κινητό μου;", preferredStyle: .alert) | 142 | + let alert = UIAlertController(title: "Ενεργοποίηση υπηρεσίας", message: "Θέλετε να γίνει ενεργοποίηση στο " + numberArg + ";", preferredStyle: .alert) |
143 | 143 | ||
144 | let cancelButton = UIAlertAction(title: "Άκυρο", style: .default, handler: { action in | 144 | let cancelButton = UIAlertAction(title: "Άκυρο", style: .default, handler: { action in |
145 | switch action.style{ | 145 | switch action.style{ |
... | @@ -310,7 +310,11 @@ import SwiftEventBus | ... | @@ -310,7 +310,11 @@ import SwiftEventBus |
310 | // MARK: - Actions | 310 | // MARK: - Actions |
311 | 311 | ||
312 | @IBAction func redeemButtomAction(_ sender: Any) { | 312 | @IBAction func redeemButtomAction(_ sender: Any) { |
313 | - self.numbersPopupTapped(sender) | 313 | + if (self.numbersList != nil && self.numbersList.count == 1) { |
314 | + self.showConfirmDialog(self.numbersList[0]) | ||
315 | + } else { | ||
316 | + self.numbersPopupTapped(sender) | ||
317 | + } | ||
314 | } | 318 | } |
315 | 319 | ||
316 | @IBAction func termsButtonAction(_ sender: Any) { | 320 | @IBAction func termsButtonAction(_ sender: Any) { |
... | @@ -344,7 +348,7 @@ extension ContextualViewController: NumbersPopupDelegate { | ... | @@ -344,7 +348,7 @@ extension ContextualViewController: NumbersPopupDelegate { |
344 | // Code for when option is selected | 348 | // Code for when option is selected |
345 | self.selectedNumber = option | 349 | self.selectedNumber = option |
346 | DispatchQueue.main.async { | 350 | DispatchQueue.main.async { |
347 | - self.showConfirmDialog() | 351 | + self.showConfirmDialog(option) |
348 | } | 352 | } |
349 | } | 353 | } |
350 | } | 354 | } | ... | ... |
-
Please register or login to post a comment