Skip to content

Commit 0be6e3b

Browse files
committed
fix #667, show the age after birthdays and years at anniversaries too
1 parent 188014c commit 0be6e3b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ android {
5656
}
5757

5858
dependencies {
59-
implementation 'com.github.SimpleMobileTools:Simple-Commons:bdc27c3188'
59+
implementation 'com.github.SimpleMobileTools:Simple-Commons:169f81b78a'
6060
implementation 'joda-time:joda-time:2.10.3'
6161
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
6262
implementation 'com.github.tibbi:IndicatorFastScroll:c3de1d040a'

app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/EditContactActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ class EditContactActivity : ContactActivity() {
547547

548548
(eventHolder as ViewGroup).apply {
549549
val contactEvent = contact_event.apply {
550-
event.value.getDateTimeFromDateString(this)
550+
event.value.getDateTimeFromDateString(true, this)
551551
tag = event.value
552552
alpha = 1f
553553
}
@@ -736,7 +736,7 @@ class EditContactActivity : ContactActivity() {
736736
eventField.setOnClickListener {
737737
MyDatePickerDialog(this, eventField.tag?.toString() ?: "") { dateTag ->
738738
eventField.apply {
739-
dateTag.getDateTimeFromDateString(this)
739+
dateTag.getDateTimeFromDateString(true, this)
740740
tag = dateTag
741741
alpha = 1f
742742
}

app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ class ViewContactActivity : ContactActivity() {
416416
events.forEach {
417417
layoutInflater.inflate(R.layout.item_view_event, contact_events_holder, false).apply {
418418
contact_events_holder.addView(this)
419-
it.value.getDateTimeFromDateString(contact_event)
419+
it.value.getDateTimeFromDateString(true, contact_event)
420420
contact_event_type.setText(getEventTextId(it.type))
421421
copyOnLongClick(it.value)
422422
}

app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfExporter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class VcfExporter {
7373

7474
contact.events.forEach {
7575
if (it.type == Event.TYPE_ANNIVERSARY || it.type == Event.TYPE_BIRTHDAY) {
76-
val dateTime = it.value.getDateTimeFromDateString()
76+
val dateTime = it.value.getDateTimeFromDateString(false)
7777
if (it.value.startsWith("--")) {
7878
val partialDate = PartialDate.builder().year(null).month(dateTime.monthOfYear).date(dateTime.dayOfMonth).build()
7979
if (it.type == Event.TYPE_BIRTHDAY) {

0 commit comments

Comments
 (0)