fix: Prompt user to save/discard changes after editing bio (#678)

Previous code didn't get the viewmodel to check if the content had
changed, so `onBackPressedCallback` wasn't enabled, and the user could
edit the bio and press "back" without being prompted to save their
changes.
This commit is contained in:
Nik Clayton 2024-05-01 22:42:53 +02:00 committed by GitHub
parent 5cb04e219c
commit a12d03b2b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -234,6 +234,10 @@ class EditProfileActivity : BaseActivity() {
viewModel.onChange(currentProfileData)
}
binding.noteEditText.doAfterTextChanged {
viewModel.onChange(currentProfileData)
}
binding.lockedCheckBox.setOnCheckedChangeListener { _, _ ->
viewModel.onChange(currentProfileData)
}