fix #667, show the age after birthdays and years at anniversaries too
This commit is contained in:
parent
188014ceb8
commit
0be6e3b77a
|
@ -56,7 +56,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:bdc27c3188'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:169f81b78a'
|
||||||
implementation 'joda-time:joda-time:2.10.3'
|
implementation 'joda-time:joda-time:2.10.3'
|
||||||
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
|
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
|
||||||
implementation 'com.github.tibbi:IndicatorFastScroll:c3de1d040a'
|
implementation 'com.github.tibbi:IndicatorFastScroll:c3de1d040a'
|
||||||
|
|
|
@ -547,7 +547,7 @@ class EditContactActivity : ContactActivity() {
|
||||||
|
|
||||||
(eventHolder as ViewGroup).apply {
|
(eventHolder as ViewGroup).apply {
|
||||||
val contactEvent = contact_event.apply {
|
val contactEvent = contact_event.apply {
|
||||||
event.value.getDateTimeFromDateString(this)
|
event.value.getDateTimeFromDateString(true, this)
|
||||||
tag = event.value
|
tag = event.value
|
||||||
alpha = 1f
|
alpha = 1f
|
||||||
}
|
}
|
||||||
|
@ -736,7 +736,7 @@ class EditContactActivity : ContactActivity() {
|
||||||
eventField.setOnClickListener {
|
eventField.setOnClickListener {
|
||||||
MyDatePickerDialog(this, eventField.tag?.toString() ?: "") { dateTag ->
|
MyDatePickerDialog(this, eventField.tag?.toString() ?: "") { dateTag ->
|
||||||
eventField.apply {
|
eventField.apply {
|
||||||
dateTag.getDateTimeFromDateString(this)
|
dateTag.getDateTimeFromDateString(true, this)
|
||||||
tag = dateTag
|
tag = dateTag
|
||||||
alpha = 1f
|
alpha = 1f
|
||||||
}
|
}
|
||||||
|
|
|
@ -416,7 +416,7 @@ class ViewContactActivity : ContactActivity() {
|
||||||
events.forEach {
|
events.forEach {
|
||||||
layoutInflater.inflate(R.layout.item_view_event, contact_events_holder, false).apply {
|
layoutInflater.inflate(R.layout.item_view_event, contact_events_holder, false).apply {
|
||||||
contact_events_holder.addView(this)
|
contact_events_holder.addView(this)
|
||||||
it.value.getDateTimeFromDateString(contact_event)
|
it.value.getDateTimeFromDateString(true, contact_event)
|
||||||
contact_event_type.setText(getEventTextId(it.type))
|
contact_event_type.setText(getEventTextId(it.type))
|
||||||
copyOnLongClick(it.value)
|
copyOnLongClick(it.value)
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ class VcfExporter {
|
||||||
|
|
||||||
contact.events.forEach {
|
contact.events.forEach {
|
||||||
if (it.type == Event.TYPE_ANNIVERSARY || it.type == Event.TYPE_BIRTHDAY) {
|
if (it.type == Event.TYPE_ANNIVERSARY || it.type == Event.TYPE_BIRTHDAY) {
|
||||||
val dateTime = it.value.getDateTimeFromDateString()
|
val dateTime = it.value.getDateTimeFromDateString(false)
|
||||||
if (it.value.startsWith("--")) {
|
if (it.value.startsWith("--")) {
|
||||||
val partialDate = PartialDate.builder().year(null).month(dateTime.monthOfYear).date(dateTime.dayOfMonth).build()
|
val partialDate = PartialDate.builder().year(null).month(dateTime.monthOfYear).date(dateTime.dayOfMonth).build()
|
||||||
if (it.type == Event.TYPE_BIRTHDAY) {
|
if (it.type == Event.TYPE_BIRTHDAY) {
|
||||||
|
|
Loading…
Reference in New Issue