recognize ringtone change at save/discard dialog too
This commit is contained in:
parent
3448b7d9eb
commit
1eea84afa7
2 changed files with 3 additions and 1 deletions
|
|
@ -38,6 +38,7 @@ abstract class ContactActivity : SimpleActivity() {
|
||||||
protected val INTENT_SELECT_RINGTONE = 600
|
protected val INTENT_SELECT_RINGTONE = 600
|
||||||
|
|
||||||
protected var contact: Contact? = null
|
protected var contact: Contact? = null
|
||||||
|
protected var originalRingtone: String? = null
|
||||||
protected var currentContactPhotoPath = ""
|
protected var currentContactPhotoPath = ""
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,7 @@ class EditContactActivity : ContactActivity() {
|
||||||
setupNewContact()
|
setupNewContact()
|
||||||
} else {
|
} else {
|
||||||
setupEditContact()
|
setupEditContact()
|
||||||
|
originalRingtone = contact?.ringtone
|
||||||
}
|
}
|
||||||
|
|
||||||
val action = intent.action
|
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() {
|
private fun openWith() {
|
||||||
Intent().apply {
|
Intent().apply {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue