apozas/contactdiary

Cannot store a contact or event accross different dates

Closed this issue · 8 comments

Use case: need to store contact event ending the day after the start. E.g. an event starting to 01/09/21 20 PM and ending on 02/09/21 2 AM.

Currently I can either end the event at 23:59 same day or store two different events.

I would like both the start and end dates to be shown in the main screen if they're different.

Hi! Long time no see :)

Thanks for the ides! I have stumbled upon this myself a few times, but I am not sure of what the best way of addressing it. I am a bit reluctant to modifying the current Contact/Event layout, although I'm open to be convinced otherwise. The logic that I have in mind right now is that the vast majority of events are not like the one you describe, so the current interface should change the slightest possible. Maybe a good solution is to add an "Add end date" button that will reveal the necessary fields if pressed. I'll play a bit with this idea in the following days. Thanks!

This is my simple design idea, for contacts and events:

Schermata del 2021-08-16 00-22-07.

I also removed duplicated inner xml layouts for edit_event and edit_contact, to harmonize them and optimize code and app size.
You can merge my pull request if you like the change proposal.

Cheers!

Thanks a lot for the code! It looks good, but I'm a bit time-limited this week. I believe that throughout the weekend I'll be able to merge the code. Thanks a lot!

Thanks a lot for the code! It looks good, but I'm a bit time-limited this week. I believe that throughout the weekend I'll be able to merge the code. Thanks a lot!

OK, please keep in mind that I added two additional string resources, that will have to be translated.

@apozas I Think there's a issue on the translatins due to commits after the the merge of the PR.
As far as I an see the string "time", that I added, is not present anymore in the current code.
This prevents the build in F-Droid, as far as I understand.
See the Build log for VersionCode 24:

Task :app:lintVitalGithubRelease FAILED
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-es/strings.xml:10: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Hora
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-ca/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Hora
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-cs/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Čas
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-de/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Uhrzeit
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-fi/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Aika
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-fr/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Heure
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-hu/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Idő
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-id/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Waktu
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-ja/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
時刻
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-nl/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Tijdstip
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-pl/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Godzina
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-pt-rBR/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Hora
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-ru/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Время
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-sv/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Tid
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-tr/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Saat
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-uk/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
Час
~~~~~~~~~~~
/home/vagrant/build/com.apozas.contactdiary/android_app/app/src/main/res/values-zh-rTW/strings.xml:11: Error: "time" is translated here but not found in default locale [ExtraTranslation]
時間
~~~~~~~~~~~
Explanation for issues of type "ExtraTranslation":
If a string appears in a specific language translation file, but there is
no corresponding string in the default locale, then this string is probably
unused. (It's technically possible that your application is only intended
to run in a specific locale, but it's still a good idea to provide a
fallback.)

Note that these strings can lead to crashes if the string is looked up on
any locale not providing a translation, so it's important to clean them
up.

17 errors, 0 warnings
Lint found fatal errors while assembling a release target.

@apozas (#39)

I thought of manually modifying the app's metadata to see if this triggers the build. But any pointer on how to fix this is greatly appreciated.

I think the easiest way to trigger the rebuild in F-Droid is to push a new release (I think you do this in this app by increasing the VersionNumber and VersionCode in the Manifest file.
Or, you can check with the repo maintainers.

Yes, that's probably the easiest one, but I would want to avoid it as much as possible, so as to have the notation consistent with the Play Store. I'll check with the repo maintainers, and see if something can be done from that side. If not, I'll just make a new version and release.