Manos Chorianopoulos

add empty numbersList popup at shareVC

...@@ -272,14 +272,18 @@ import SwiftEventBus ...@@ -272,14 +272,18 @@ import SwiftEventBus
272 // MARK: NumbersPopup 272 // MARK: NumbersPopup
273 extension ShareViewController: NumbersPopupDelegate { 273 extension ShareViewController: NumbersPopupDelegate {
274 @objc func numbersPopupTapped(_ sender: Any) { 274 @objc func numbersPopupTapped(_ sender: Any) {
275 - let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) 275 + if (self.numbersList.count == 0) {
276 - // self.storyboard? 276 + self.showDialog("Κάνε δώρο","Για την αποστολή του δώρου σου χρειάζεται να έχεις κινητό COSMOTE.")
277 - let pp = storyboard.instantiateViewController(withIdentifier: "NumberPopupViewController") as! SwiftWarplyFramework.NumberPopupViewController 277 + } else {
278 - pp.InitWithController(controller: self, 278 + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
279 - numbersList: self.numbersList, 279 + // self.storyboard?
280 - sender: sender, 280 + let pp = storyboard.instantiateViewController(withIdentifier: "NumberPopupViewController") as! SwiftWarplyFramework.NumberPopupViewController
281 - delegate: self, 281 + pp.InitWithController(controller: self,
282 - headerText: "Αποστολέας") 282 + numbersList: self.numbersList,
283 + sender: sender,
284 + delegate: self,
285 + headerText: "Αποστολέας")
286 + }
283 } 287 }
284 288
285 func presentedPopup() { 289 func presentedPopup() {
......