recognize ringtone change at save/discard dialog too
This commit is contained in:
parent
3448b7d9eb
commit
1eea84afa7
|
@ -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?) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue