Skip to content

Commit

Permalink
fix: Order cancel alert dialog (fossasia#1882) (fossasia#1884)
Browse files Browse the repository at this point in the history
  • Loading branch information
liveHarshit authored and nikit19 committed Jun 3, 2019
1 parent 3a6e5c7 commit 34ff332
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,13 @@ class AttendeeFragment : Fragment(), ComplexBackPressFragment {
AlertDialog.Builder(requireContext())
.setTitle(getString(R.string.cancel_order))
.setMessage(getString(R.string.cancel_order_message))
.setPositiveButton(getString(R.string.continue_string)) { _, _ -> /* Do Nothing */ }
.setNegativeButton(getString(R.string.cancel)) { _, _ ->
.setPositiveButton(getString(R.string.continue_string)) { _, _ ->
if (!attendeeViewModel.orderCreatedSuccess)
attendeeViewModel.cancelPendingOrder()
findNavController(rootView).popBackStack()
}
.setNegativeButton(getString(R.string.cancel)) { dialog, _ ->
dialog.cancel()
}.create()
.show()
}
Expand Down

0 comments on commit 34ff332

Please sign in to comment.