Skip to content

Commit

Permalink
Lift return
Browse files Browse the repository at this point in the history
  • Loading branch information
seadowg committed Mar 11, 2023
1 parent 42f1a9c commit e49aa34
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ object QuitFormDialog {
}

private fun getDiscardItem(formSaveViewModel: FormSaveViewModel): IconMenuItem {
if (formSaveViewModel.hasSaved()) {
return IconMenuItem(R.drawable.ic_delete, R.string.discard_changes)
return if (formSaveViewModel.hasSaved()) {
IconMenuItem(R.drawable.ic_delete, R.string.discard_changes)
} else {
return IconMenuItem(R.drawable.ic_delete, R.string.do_not_save)
IconMenuItem(R.drawable.ic_delete, R.string.do_not_save)
}
}
}

0 comments on commit e49aa34

Please sign in to comment.