Manos Chorianopoulos

fix sharing success popup buttons

......@@ -3003,23 +3003,27 @@ public class swiftApi {
func initialSharingDialog(_ controller: UIViewController, _ alertTitle: String, _ sharingId: String) -> Void {
let alert = UIAlertController(title: "Συγχαρητήρια!", message: alertTitle, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Ενεργοποίηση", style: .default, handler: { action in
let cancelButton = UIAlertAction(title: "Απόρριψη", style: .default, handler: { action in
switch action.style{
case .default:
self.cosmoteRetrieveSharingAsync(sharingId: sharingId, accept: true, retrieveSharingCallback)
self.rejectSharingDialog(controller, sharingId)
case .cancel:
print("cancel")
case .destructive:
print("destructive")
}
}))
alert.addAction(UIAlertAction(title: "Απόρριψη", style: .default, handler: { action in
})
cancelButton.setValue(UIColor(rgb: 0xFC5757), forKey: "titleTextColor")
alert.addAction(cancelButton)
alert.addAction(UIAlertAction(title: "Ενεργοποίηση", style: .default, handler: { action in
switch action.style{
case .default:
self.rejectSharingDialog(controller, sharingId)
self.cosmoteRetrieveSharingAsync(sharingId: sharingId, accept: true, retrieveSharingCallback)
case .cancel:
print("cancel")
......@@ -3029,6 +3033,7 @@ public class swiftApi {
}
}))
controller.present(alert, animated: true, completion: nil)
......