Created
August 20, 2020 22:33
-
-
Save manuelernesto/2120ff3c94cb980ef2c3b1ccc7b24a41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun apagarPalestrante() { | |
AlertDialog.Builder(requireContext()).apply { | |
setTitle("Deseja realmente apagar?") | |
setNegativeButton("Não") { _, _ -> | |
} | |
setPositiveButton("Sim") { _, _ -> | |
launch { | |
context.let { | |
PalestranteDB.getDatabase(it).dao().apagar(mPalestrante!!) | |
val action = SpeakersFragmentDirections.toHomeFragment() | |
Navigation.findNavController(requireView()).navigate(action) | |
} | |
} | |
} | |
}.create().show() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment