mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
recognize ringtone change at save/discard dialog too
This commit is contained in:
@ -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 {
|
||||||
|
Reference in New Issue
Block a user