recognize ringtone change at save/discard dialog too

This commit is contained in:
tibbi 2021-12-12 18:59:41 +01:00
parent 3448b7d9eb
commit 1eea84afa7
2 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,7 @@ abstract class ContactActivity : SimpleActivity() {
protected val INTENT_SELECT_RINGTONE = 600
protected var contact: Contact? = null
protected var originalRingtone: String? = null
protected var currentContactPhotoPath = ""
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {

View File

@ -156,6 +156,7 @@ class EditContactActivity : ContactActivity() {
setupNewContact()
} else {
setupEditContact()
originalRingtone = contact?.ringtone
}
val action = intent.action
@ -295,7 +296,7 @@ class EditContactActivity : ContactActivity() {
}
}
private fun hasContactChanged() = contact != fillContactValues()
private fun hasContactChanged() = contact != fillContactValues() || originalRingtone != contact?.ringtone
private fun openWith() {
Intent().apply {