From 20014021918759b53ae2ba6a4fa46ba7d3904c35 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 1 Nov 2020 10:20:34 +0100 Subject: [PATCH 01/71] Fix Only Close Contacts not showing. Fixes #15 --- .../src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt index b6c9ea1..8ca39b1 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt @@ -41,7 +41,7 @@ class FeedReaderDbHelper(context: Context) : SQLiteOpenHelper(context, DATABASE_ val query = if (onlyRisky) { "Select * from " + ContactDatabase.ContactDatabase.FeedEntry.TABLE_NAME + - " WHERE " + ContactDatabase.ContactDatabase.FeedEntry.CLOSECONTACT_COLUMN + ">=1" + + " WHERE " + ContactDatabase.ContactDatabase.FeedEntry.CLOSECONTACT_COLUMN + ">1" + " ORDER BY " + ContactDatabase.ContactDatabase.FeedEntry.DATETIME_COLUMN + " DESC" } else { "Select * from " + ContactDatabase.ContactDatabase.FeedEntry.TABLE_NAME + From 41c478811754940671ab9b2cadb1553aa06d6f5a Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 1 Nov 2020 10:34:45 +0100 Subject: [PATCH 02/71] Prevent crashes on loading faulty forms generated with v1.0.5 --- .../java/com/apozas/contactdiary/EditContactActivity.kt | 9 ++++++--- .../java/com/apozas/contactdiary/EditEventActivity.kt | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt index 8222115..aac0881 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt @@ -70,17 +70,20 @@ class EditContactActivity : AppCompatActivity() { } var relative = cursor.getInt(cursor.getColumnIndex(feedEntry.RELATIVE_COLUMN)) - if (relative%2==0) {relative = 2*relative+1} // Migration from 1.0.4 fix + if (relative%2==0) {relative = 2*relative+1} + else if (relative==-1) {relative = known_group.childCount-2} // Migration from 1.0.4 fix val relativeBtn = known_group.getChildAt(relative) as RadioButton relativeBtn.isChecked = true var encounter = cursor.getInt(cursor.getColumnIndex(feedEntry.ENCOUNTER_COLUMN)) - if (encounter%2==0) {encounter = 2*encounter+1} // Migration from 1.0.4 fix + if (encounter%2==0) {encounter = 2*encounter+1} + else if (encounter==-1) {encounter = contact_indoor_outdoor.childCount-2} // Migration from 1.0.4 fix val encounterBtn = contact_indoor_outdoor.getChildAt(encounter) as RadioButton encounterBtn.isChecked = true var closeContact = cursor.getInt(cursor.getColumnIndex(feedEntry.CLOSECONTACT_COLUMN)) - if (closeContact%2==0) {closeContact = 2*closeContact+1} // Migration from 1.0.4 fix + if (closeContact%2==0) {closeContact = 2*closeContact+1} + else if (closeContact==-1) {closeContact = distance_group.childCount-2} // Migration from 1.0.4 fix val closeContactBtn = distance_group.getChildAt(closeContact) as RadioButton closeContactBtn.isChecked = true diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt index 2ec11eb..ad57c1c 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt @@ -73,12 +73,14 @@ class EditEventActivity : AppCompatActivity() { } var encounter = cursor.getInt(cursor.getColumnIndex(feedEntry.ENCOUNTER_COLUMN)) - if (encounter%2==0) {encounter = 2*encounter+1} // Migration from 1.0.4 fix + if (encounter%2==0) {encounter = 2*encounter+1} + else if (encounter==-1) {encounter = event_indoor_outdoor.childCount-2} // Migration from 1.0.4 fix val encounterBtn = event_indoor_outdoor.getChildAt(encounter) as RadioButton encounterBtn.isChecked = true var closeContact = cursor.getInt(cursor.getColumnIndex(feedEntry.CLOSECONTACT_COLUMN)) - if (closeContact%2==0) {closeContact = 2*closeContact+1} // Migration from 1.0.4 fix + if (closeContact%2==0) {closeContact = 2*closeContact+1} + else if (closeContact==-1) {closeContact = eventclosecontact.childCount-2} // Migration from 1.0.4 fix val closeContactBtn = eventclosecontact.getChildAt(closeContact) as RadioButton closeContactBtn.isChecked = true From f820c2cc4fbebb6fb636cb155c0bb033f0ea21d6 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 1 Nov 2020 11:38:24 +0100 Subject: [PATCH 03/71] Remove unnecessary stroke --- android_app/app/src/main/res/drawable/rounded_corner.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/android_app/app/src/main/res/drawable/rounded_corner.xml b/android_app/app/src/main/res/drawable/rounded_corner.xml index 360ecad..279b061 100644 --- a/android_app/app/src/main/res/drawable/rounded_corner.xml +++ b/android_app/app/src/main/res/drawable/rounded_corner.xml @@ -1,8 +1,5 @@ - From 6d74d7e85e73cb068151dcb9c2d95992812a64d4 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 1 Nov 2020 16:45:01 +0100 Subject: [PATCH 04/71] Add Polish translation --- .../app/src/main/res/values-pl/strings.xml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 android_app/app/src/main/res/values-pl/strings.xml diff --git a/android_app/app/src/main/res/values-pl/strings.xml b/android_app/app/src/main/res/values-pl/strings.xml new file mode 100644 index 0000000..b01195d --- /dev/null +++ b/android_app/app/src/main/res/values-pl/strings.xml @@ -0,0 +1,71 @@ + + + Dziennik Kontaktów + Ustawienia + Nowy kontakt + Nowe wydarzenie + Nazwa wydarzenia + Nie + Tak + Data + Godzina + Miejsce + Towarzyszący (opcjonalnie) + Myślisz, że zachowaliście dystans? + Imię + Krewny lub bliski znajomy? + Myślisz, że zachowaliście dystans? + Telefon (opcjonalnie) + Nie wiem + Warunki spotkania + W pomieszczeniu + Na zewnątrz + Dziennik jest pusty + Spotkanie zapisane + Wydarzenie zapisane + Edytuj wydarzenie + Edytuj spotkanie + Godzina (opcjonalnie) + Opcje + Wpis usunięty + Daj znać, co sądzisz o programie albo poinformuj o napotkanych błędach + Kontakt z programistą + Kup mi kawę + Z kim się dziś spotkałeś? + Dodaj swoje spotkania do dziennika + Proszę wybrać opcję + Pole obowiązkowe + Edytuj + Usuń + Alarm zmieniony + Wpisz poprawną datę + Codzienne przypomnienie + Wybierz godzinę + Pokaż tylko bliskie kontakty + Więcej + Ustawienia + Wpisy usunięte + " wybranych wpisów" + Polityka prywatności + Dziennik Kontaktów jest rozprowadzany w nadziei, że będzie pomocny, ale BEZ JAKICHKOLWIEK GWARANCJI, nawet bez gwarancji ZBYWALNOŚCI lub DOPASOWANIA DO KONKRETNYCH CELÓW. Ta strona służy udzieleniu użytkownikom informacji na temat polityki zbierania i udostępniania danych osobowych, jeśli zdecydują się oni na użycie Dziennika Kontaktów. Ponieważ Dziennik Kontaktów nie może łączyć się z internetem, żadne dane nie będą przesłane ani przechowane poza urządzeniem. Jeśli decydujesz się używać Dziennika Kontaktów, zgadzasz się na to, że dane nie będą zbierane ani wykorzystane. Informacje, które zbierze Dziennik Kontaktów, są wykorzystane tylko wewnątrz aplikacji. Jak zostało jasno podkreślone powyżej, nie mogę i nie będę dzielił się informacjami z innymi podmiotami. + Korzystanie z Dziennika Kontaktów wymaga wprowadzenia pewnych informacji, a mianowicie Nazw, Miejsc i (nieobowiązkowo) numerów Telefonów. Informacje, które Dziennik Kontaktów zbierze, zostaną zachowane na Twoim urządzeniu i nie będą w żaden sposób gromadzone poza nim. + Pliki cookie to pliki z niewielką ilością danych, które są powszechnie używane jako anonimowe niepowtarzalne identyfikatory. Są one wysyłane do Twojej przeglądarki z witryn, które odwiedzasz i są przechowywane w wewnętrznej pamięci urządzenia.\n\nDziennik Kontaktów nie używa żadnych plików cookie, ani własnych, ani stron trzecich.\n\nW ten sam sposób żadne informacje nie są przekazywane osobom trzecim. Informacje, które wprowadzasz do Dziennika Kontaktów, nigdy nie opuszczają Twojego urządzenia. + Jeszcze raz: żadne informacje, które wprowadzisz w Dzienniku Kontaktów, nie opuszczą Twojego urządzenia. Możesz się o tym przekonać, weryfikując kod źródłowy Dziennika Kontaktów na www.github.com/apozas/contactdiary. W związku z tym bezpieczeństwo i integralność danych całkowicie zależą od fizycznego zabezpieczenia Twojego urządzenia, za co nie odpowiadam. + Mogę aktualizować niniejszą Politykę Prywatności od czasu do czasu. Dlatego też zalecam okresowo przeglądać tę strony w celu śledzenia zmian. Powiadomię Cię o wszelkich zmianach, publikując nową Politykę prywatności na tej stronie.\n\nTa polityka wchodzi w życie 2020-09-08 + Jeśli masz jakieś pytania lub sugestie dotyczące niniejszej Polityki Prywatności, nie wahaj się skontaktować ze mną pod adresem contactdiary@alexpozas.com (najlepiej w języku angielskim). + Zmiany w tej polityce prywatności + Gromadzenie i wykorzystywanie informacji + Pliki cookie i dostawcy usług + Bezpieczeństwo + Skontaktuj się ze mną + Naciśnij (+), aby rozpocząć dodawanie spotkań + Wersja aplikacji + + Oceń aplikację + Jeśli podoba Ci się aplikacja, oceń ją i zrecenzuj, aby dotarła do większej liczby osób, którym może okazać się przydatna + Wpis powielony + Wpisy powielone + Utworzyć dziś kopię + Wybierz + Notatki (opcjonalnie) + From a3281f3812745ab0f030db8ce74e1471ced0dba2 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Thu, 5 Nov 2020 19:50:06 +0100 Subject: [PATCH 05/71] Add Finnish translation --- .../app/src/main/res/values-fi/strings.xml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 android_app/app/src/main/res/values-fi/strings.xml diff --git a/android_app/app/src/main/res/values-fi/strings.xml b/android_app/app/src/main/res/values-fi/strings.xml new file mode 100644 index 0000000..9c35514 --- /dev/null +++ b/android_app/app/src/main/res/values-fi/strings.xml @@ -0,0 +1,71 @@ + + + Yhteystietopäiväkirja + Asetukset + Uusi yhteystieto + Uusi tapahtuma + Tapahtuman nimi + Ei + Kyllä + Päivämäärä + Aika + Paikka + Seuralaiset (vapaaehtoinen) + Luuletko, että pidit etäisyyden? + Nimi + Sukulainen vai läheinen ystävä? + Luuletko, että pidit etäisyyden? + Puhelinnumero (vapaaehtoinen) + Epävarma + Kohtaamisen tyyppi + Sisätiloissa + Ulkona + Päiväkirja on tyhjä + Yhteystieto tallennettu + Tapahtuma tallennettu + Muokkaa tapahtumaa + Muokkaa yhteystietoa + Aika (vapaaehtoinen) + Vaihtoehdot + Merkintä poistettu + Kerro minulle mitä mieltä olet sovelluksesta tai ongelmista, joita olet kohdannut + Ota yhteyttä kehittäjään + Tarjoa minulle kahvit + Kenen kanssa olet ollut tänään? + Lisää yhteystietosi päiväkirjaan + Valitse vaihtoehto + Pakollinen kenttä + Muokkaa + Poista + Hälytystä muokattu + Aseta oikea aika + Päivittäinen muistutus + Valitse aika + Näytä vain läheiset yhteystiedot + Lisää + Asetukset + Merkinnät poistettu + " merkinnät valittu" + Tietosuojakäytäntö + Yhteystietopäiväkirja jaetaan siinä toivossa, että se olisi hyödyllinen, mutta ILMAN MITÄÄN TAKUUTA; ilman edes epäsuoraa takuuta KAUPALLISUUDESTA tai SOVELTUVUUDESTA TIETTYYN TARKOITUKSEEN. Tätä sivua käytetään tiedottamaan kävijöille minun käytännöistäni henkilökohtaisten tietojen keruun, käytön, ja paljastumisen suhteen, jos joku päättää käyttää Yhteystietopäiväkirjaa. Lyhyesti sanottuna, ja koska Yhteystietopäiväkirja ei voi muodostaa yhteyttä Internetiin, mitään henkilötietoja ei tallenneta eikä kopioida käyttäjän laitteen ulkopuolelle. Jos päätät käyttää Yhteystietopäiväkirjaa, niin suostut tietojen keruuseen (ei mitään) ja käyttöön tähän käytäntöön liittyen. Henkilökohtaisia tietoja, joita Yhteystietopäiväkirja kerää, käytetään sen palvelun tarjoamiseen. Kuten edellä on todettu, en voi ja enkä näin ollen käytä tai jaa tietojasi kenenkään kanssa. + Yhteystietopäiväkirjan käyttö edellyttää, että syötät tiettyjä henkilökohtaisesti tunnistettavissa olevia tietoja, eli nimiä, paikkoja ja (vapaaehtoisesti) puhelinnumeroita. Tiedot, joita Yhteystieto Päiväkirja pyytää, säilytetään laitteellasi ja minä en kerää niitä millään tavalla. + Evästeet ovat tiedostoja, joissa on pieni määrä tietoja, joita käytetään yleisesti nimettöminä yksilöllisinä tunnisteina. Nämä lähetetään selaimeesi sivustoilta, joilla käyt ja jotka tallennetaan laitteesi sisäiseen muistiin.\n\nYhteystiedot Päiväkirja ei käytä mitään evästeitä, ei ensimmäisen osapuolen eikä kolmannen osapuolen.\n\nSamalla tavalla mitään palvelua ei ole delegoitu kolmansille osapuolille. Yhteystiedot Päiväkirjalle antamasi tiedot eivät koskaan poistu laitteestasi. + Edelleen, mitään Yhteystietopäiväkirjaan syöttämiäsi tietoja ei koskaan lähde laitteeltasi. Tämä seikka voidaan aina arvioida tarkastamalla Yhteystietopäiväkirjan lähdekoodia, joka on saatavilla osoitteessa www. ithub.com/apozas/contactdiary. Näin ollen sovelluksen turvallisuus ja eheys liittyvät laitteesi fyysiseen turvallisuuteen ja eheyteen, joista en ota vastuuta. + Saatan päivittää tätä tietosuojakäytäntöä ajoittain. Täten sinua kehotetaan tarkastelemaan tätä sivua säännöllisin väliajoin muutosten varalta. Ilmoitan sinulle kaikista muutoksista julkaisemalla uuden tietosuojakäytännön tälle sivulle.\n\nTämä politiikka on voimassa 2020-09-08 alkaen + Jos sinulla on kysyttävää tai ehdotuksia tästä tietosuojakäytännöstä, älä epäröi ottaa yhteyttä minuun contactdiary@alexpozas.com (mieluiten englanniksi). + Muutokset tähän tietosuojakäytäntöön + Tietojen keruu ja käyttö + Evästeet ja palveluntarjoajat + Turvallisuus + Ota yhteyttä minuun + Paina (+) aloittaaksesi yhteystietojen lisäämisen + Sovellusversio + + Arvostele sovellus + Jos pidät sovelluksesta, arvostele se, jotta se voi tavoittaa enemmän ihmisiä, jotka saattavat pitää sitä hyödyllisenä + Merkintä kopioitu + Merkinnät kopioitu + Tee kopio tänään + Valitse + Huomautukset (vapaaehtoinen) + From 16f945ba6bb96fb4e1ad240ed5b6048dd12e65fd Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Thu, 5 Nov 2020 20:31:29 +0100 Subject: [PATCH 06/71] Add Indonesian translation --- .../app/src/main/res/values-id/strings.xml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 android_app/app/src/main/res/values-id/strings.xml diff --git a/android_app/app/src/main/res/values-id/strings.xml b/android_app/app/src/main/res/values-id/strings.xml new file mode 100644 index 0000000..88eb66c --- /dev/null +++ b/android_app/app/src/main/res/values-id/strings.xml @@ -0,0 +1,71 @@ + + + Catatan Kontak + Pengaturan + Kontak baru + Acara baru + Nama acara + Tidak + Ya + Tanggal + Waktu + Lokasi + Pendamping (opsional) + Apakah Anda pikir Anda menjaga jarak? + Nama + Kerabat atau teman dekat? + Apakah Kalian menjaga jarak? + Telepon (opsional) + Tidak yakin + Jenis pertemuan + Dalam ruangan + Luar ruangan + Catatan kosong + Kontak disimpan + Acara disimpan + Edit acara + Edit kontak + Waktu (opsional) + Pilihan + Entri dihapus + Beri tahu saya pendapat Anda tentang aplikasi, atau masalah yang Anda temui + Hubungi pengembang + Belikan aku kopi + Dengan siapa Anda hari ini? + Tambahkan kontak Anda ke buku harian + Harap pilih satu opsi + Wajib diisi + Edit + Hapus + Alarm diubah + Harap masukkan waktu yang benar + Pengingat harian + Pilih waktu + Tampilkan hanya kontak dekat saja + Lainnya + Pengaturan + Entri dihapus + " entri terpilih" + Kebijakan privasi + Catatan Kontak didistribusikan dengan harapan bermanfaat, tetapi TANPA JAMINAN APA PUN; bahkan tanpa jaminan tersirat tentang DIPERDAGANGKAN atau KESESUAIAN UNTUK TUJUAN TERTENTU. Halaman ini digunakan untuk memberi tahu pengunjung mengenai kebijakan saya dengan pengumpulan, penggunaan, dan pengungkapan Informasi Pribadi jika ada yang memutuskan untuk menggunakan Catatan Kontak. Singkatnya, dan karena Catatan Kontak tidak dapat terhubung ke internet, tidak ada Informasi Pribadi yang akan disimpan atau disalin di luar perangkat pengguna. Jika Anda memilih untuk menggunakan Catatan Kontak, Anda menyetujui pengumpulan (tidak ada) dan penggunaan informasi terkait dengan kebijakan ini. Informasi Pribadi yang dikumpulkan Catatan Kontak digunakan untuk menyediakan layanannya. Seperti yang dijelaskan di atas, saya tidak dapat dan karenanya tidak akan menggunakan atau membagikan informasi Anda dengan siapa pun. + Penggunaan Catatan Kontak mengharuskan Anda memasukkan informasi pengenal pribadi tertentu, yaitu Nama, Tempat, dan (opsional) Nomor telepon. Informasi yang diminta Catatan Kontak akan disimpan di perangkat Anda dan tidak dikumpulkan oleh saya dengan cara apa pun. + Kuki adalah file dengan sejumlah kecil data yang biasanya digunakan sebagai pengenal unik anonim. Ini dikirim ke browser Anda dari situs web yang Anda kunjungi dan disimpan di memori internal perangkat Anda.\n\nCatatan Kontak tidak menggunakan kuki apa pun, baik pihak pertama maupun pihak ketiga.\n\nDengan cara yang sama, tidak layanan didelegasikan kepada pihak ketiga. Informasi yang Anda masukkan ke Catatan Kontak tidak pernah meninggalkan perangkat Anda. + Sekali lagi, tidak ada informasi yang Anda masukkan ke Catatan Kontak yang pernah keluar dari perangkat Anda. Fakta ini selalu dapat dievaluasi dengan memeriksa kode sumber Catatan Kontak, yang tersedia di www.github.com/apozas/contactdiary. Karenanya, keamanan dan integritasnya terkait dengan keamanan fisik dan integritas perangkat Anda, yang saya tidak bertanggung jawab. + Saya dapat memperbarui Kebijakan Privasi ini dari waktu ke waktu. Dengan demikian, Anda disarankan untuk meninjau halaman ini secara berkala untuk setiap perubahan. Saya akan memberi tahu Anda tentang perubahan apa pun dengan memposting Kebijakan Privasi baru di halaman ini.\n\nKebijakan ini berlaku mulai 08-09-2020 + Jika Anda memiliki pertanyaan atau saran tentang Kebijakan Privasi ini, jangan ragu untuk menghubungi saya di contactdiary@alexpozas.com (sebaiknya dalam bahasa Inggris). + Perubahan pada kebijakan privasi ini + Pengumpulan dan penggunaan informasi + Kuki dan penyedia layanan + Keamanan + Hubungi saya + Tekan (+) untuk mulai menambahkan kontak + Versi aplikasi + + Beri nilai aplikasi + Jika Anda menyukai aplikasinya, beri peringkat dan ulas agar dapat menjangkau lebih banyak orang yang mungkin merasakan kegunaannya + Entri digandakan + Entri digandakan + Buat salinan hari ini + Pilih + Catatan (opsional) + From c9c937f99645f8566cb32376d245af9a771d5b39 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Thu, 5 Nov 2020 20:42:10 +0100 Subject: [PATCH 07/71] Minor fixes in translations --- android_app/app/src/main/res/values-fi/strings.xml | 2 +- android_app/app/src/main/res/values-fr/strings.xml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/android_app/app/src/main/res/values-fi/strings.xml b/android_app/app/src/main/res/values-fi/strings.xml index 9c35514..e6fd4e5 100644 --- a/android_app/app/src/main/res/values-fi/strings.xml +++ b/android_app/app/src/main/res/values-fi/strings.xml @@ -50,7 +50,7 @@ Yhteystietopäiväkirja jaetaan siinä toivossa, että se olisi hyödyllinen, mutta ILMAN MITÄÄN TAKUUTA; ilman edes epäsuoraa takuuta KAUPALLISUUDESTA tai SOVELTUVUUDESTA TIETTYYN TARKOITUKSEEN. Tätä sivua käytetään tiedottamaan kävijöille minun käytännöistäni henkilökohtaisten tietojen keruun, käytön, ja paljastumisen suhteen, jos joku päättää käyttää Yhteystietopäiväkirjaa. Lyhyesti sanottuna, ja koska Yhteystietopäiväkirja ei voi muodostaa yhteyttä Internetiin, mitään henkilötietoja ei tallenneta eikä kopioida käyttäjän laitteen ulkopuolelle. Jos päätät käyttää Yhteystietopäiväkirjaa, niin suostut tietojen keruuseen (ei mitään) ja käyttöön tähän käytäntöön liittyen. Henkilökohtaisia tietoja, joita Yhteystietopäiväkirja kerää, käytetään sen palvelun tarjoamiseen. Kuten edellä on todettu, en voi ja enkä näin ollen käytä tai jaa tietojasi kenenkään kanssa. Yhteystietopäiväkirjan käyttö edellyttää, että syötät tiettyjä henkilökohtaisesti tunnistettavissa olevia tietoja, eli nimiä, paikkoja ja (vapaaehtoisesti) puhelinnumeroita. Tiedot, joita Yhteystieto Päiväkirja pyytää, säilytetään laitteellasi ja minä en kerää niitä millään tavalla. Evästeet ovat tiedostoja, joissa on pieni määrä tietoja, joita käytetään yleisesti nimettöminä yksilöllisinä tunnisteina. Nämä lähetetään selaimeesi sivustoilta, joilla käyt ja jotka tallennetaan laitteesi sisäiseen muistiin.\n\nYhteystiedot Päiväkirja ei käytä mitään evästeitä, ei ensimmäisen osapuolen eikä kolmannen osapuolen.\n\nSamalla tavalla mitään palvelua ei ole delegoitu kolmansille osapuolille. Yhteystiedot Päiväkirjalle antamasi tiedot eivät koskaan poistu laitteestasi. - Edelleen, mitään Yhteystietopäiväkirjaan syöttämiäsi tietoja ei koskaan lähde laitteeltasi. Tämä seikka voidaan aina arvioida tarkastamalla Yhteystietopäiväkirjan lähdekoodia, joka on saatavilla osoitteessa www. ithub.com/apozas/contactdiary. Näin ollen sovelluksen turvallisuus ja eheys liittyvät laitteesi fyysiseen turvallisuuteen ja eheyteen, joista en ota vastuuta. + Edelleen, mitään Yhteystietopäiväkirjaan syöttämiäsi tietoja ei koskaan lähde laitteeltasi. Tämä seikka voidaan aina arvioida tarkastamalla Yhteystietopäiväkirjan lähdekoodia, joka on saatavilla osoitteessa www.github.com/apozas/contactdiary. Näin ollen sovelluksen turvallisuus ja eheys liittyvät laitteesi fyysiseen turvallisuuteen ja eheyteen, joista en ota vastuuta. Saatan päivittää tätä tietosuojakäytäntöä ajoittain. Täten sinua kehotetaan tarkastelemaan tätä sivua säännöllisin väliajoin muutosten varalta. Ilmoitan sinulle kaikista muutoksista julkaisemalla uuden tietosuojakäytännön tälle sivulle.\n\nTämä politiikka on voimassa 2020-09-08 alkaen Jos sinulla on kysyttävää tai ehdotuksia tästä tietosuojakäytännöstä, älä epäröi ottaa yhteyttä minuun contactdiary@alexpozas.com (mieluiten englanniksi). Muutokset tähän tietosuojakäytäntöön diff --git a/android_app/app/src/main/res/values-fr/strings.xml b/android_app/app/src/main/res/values-fr/strings.xml index 8eb06cf..ecb41ff 100644 --- a/android_app/app/src/main/res/values-fr/strings.xml +++ b/android_app/app/src/main/res/values-fr/strings.xml @@ -47,8 +47,7 @@ Entrées supprimées " entrées sélectionnées" Charte de confidentialité - Journal des Contacts est distribué dans l\'espoir qu\'il sera utile, MAIS SANS AUCUNE GARANTIE; sans même la garantie implicite de COMMERCIALITÉ ou d\'ADAPTATION À UN USAGE PARTICULIER. Ce message a pour but d\'informer les visiteurs à propos de mes politiques de collecte, d\'utilisation et de partage d\'informations personnelles des personnes ayant décidées d\'utiliser Journal des Contacts. -Pour faire court, sachant que Journal des Contacts ne peut pas se connecter à Internet, aucune information personnelle ne sera stockée ou copiée en dehors de l\'appareil de l\'utilisateur. Si vous choisissez d\'utiliser Journal des Contacts, alors vous devez accepter la collecte (aucune) et l\'utilisation d\'informations au regard de cette politique. Les informations personnelles que Journal des Contacts collecte sont utilisées afin de fournir son service. Comme explicité ci-dessus, je ne peux pas et n\'utiliserais ou ne partagerais pas vos informations à quiconque. + Journal des Contacts est distribué dans l\'espoir qu\'il sera utile, MAIS SANS AUCUNE GARANTIE; sans même la garantie implicite de COMMERCIALITÉ ou d\'ADAPTATION À UN USAGE PARTICULIER. Ce message a pour but d\'informer les visiteurs à propos de mes politiques de collecte, d\'utilisation et de partage d\'informations personnelles des personnes ayant décidées d\'utiliser Journal des Contacts. Pour faire court, sachant que Journal des Contacts ne peut pas se connecter à Internet, aucune information personnelle ne sera stockée ou copiée en dehors de l\'appareil de l\'utilisateur. Si vous choisissez d\'utiliser Journal des Contacts, alors vous devez accepter la collecte (aucune) et l\'utilisation d\'informations au regard de cette politique. Les informations personnelles que Journal des Contacts collecte sont utilisées afin de fournir son service. Comme explicité ci-dessus, je ne peux pas et n\'utiliserais ou ne partagerais pas vos informations à quiconque. L\'utilisation de Journal des Contacts exige que vous saisissiez certaines informations personnelles identifiables, à savoir les Noms, Lieux et (optionnellement) les Numéros de téléphone. Les informations que Journal des Contacts demande seront conservées sur votre appareil et ne seront en aucun cas collectées par moi. Les cookies sont des fichiers contenant une petite quantité de données qui sont couramment utilisés comme identificateurs uniques anonymes. Ceux-ci sont envoyés à votre navigateur à partir des sites Web que vous visitez et sont stockés dans la mémoire interne de votre appareil.\n\nJournal des Contacts n\'utilise aucun cookie, ni propriétaires ni de tiers\n\nDe la même manière, aucun service n\'est délégué à des tiers. Les informations que vous entrez dans Journal des Contacts ne quittent jamais votre appareil. Encore une fois, aucune des informations que vous entrez dans Journal des Contacts ne quitte votre appareil. Vous pouvez toujours le vérifier en inspectant le code source de Journal des Contacts, disponible sur www.github.com/apozas/contactdiary. Dès lors, leur sécurité et leur intégrité sont liées à la sécurité physique et à l\'intégrité de votre appareil, dont je ne suis en aucun cas responsable. From e5633c5efea26ed517e359372c9ab470a9c692ce Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sat, 7 Nov 2020 18:04:40 +0100 Subject: [PATCH 08/71] Add in-app acknowledgments --- android_app/app/src/main/AndroidManifest.xml | 9 ++ .../com/apozas/contactdiary/ThanksActivity.kt | 55 ++++++++++++ .../src/main/res/layout/activity_thanks.xml | 87 +++++++++++++++++++ .../app/src/main/res/values-ca/strings.xml | 2 + .../app/src/main/res/values-de/strings.xml | 2 + .../app/src/main/res/values-es/strings.xml | 2 + .../app/src/main/res/values-fi/strings.xml | 2 + .../app/src/main/res/values-fr/strings.xml | 2 + .../app/src/main/res/values-id/strings.xml | 2 + .../app/src/main/res/values-it/strings.xml | 2 + .../app/src/main/res/values-nl/strings.xml | 2 + .../app/src/main/res/values-pl/strings.xml | 2 + .../app/src/main/res/values-sv/strings.xml | 2 + .../app/src/main/res/values/strings.xml | 12 +++ .../app/src/main/res/xml/preferences.xml | 12 +++ 15 files changed, 195 insertions(+) create mode 100644 android_app/app/src/main/java/com/apozas/contactdiary/ThanksActivity.kt create mode 100644 android_app/app/src/main/res/layout/activity_thanks.xml diff --git a/android_app/app/src/main/AndroidManifest.xml b/android_app/app/src/main/AndroidManifest.xml index 62bfd8e..9254668 100644 --- a/android_app/app/src/main/AndroidManifest.xml +++ b/android_app/app/src/main/AndroidManifest.xml @@ -66,6 +66,15 @@ + + + + + + diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/ThanksActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/ThanksActivity.kt new file mode 100644 index 0000000..e137daa --- /dev/null +++ b/android_app/app/src/main/java/com/apozas/contactdiary/ThanksActivity.kt @@ -0,0 +1,55 @@ +package com.apozas.contactdiary + +/* + This file is part of Contact Diary. + Contact Diary is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Contact Diary is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Contact Diary. If not, see . + Copyright 2020 by Alex Pozas-Kerstjens (apozas) +*/ + +import android.os.Bundle +import android.text.method.LinkMovementMethod +import android.widget.TextView +import androidx.appcompat.app.AppCompatActivity + +class ThanksActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_thanks) + + val homeScreen = findViewById(R.id.thanks_homescreen) + homeScreen.movementMethod = LinkMovementMethod.getInstance() + + val dutch = findViewById(R.id.thanks_dutch) + dutch.movementMethod = LinkMovementMethod.getInstance() + + val finnish = findViewById(R.id.thanks_finnish) + finnish.movementMethod = LinkMovementMethod.getInstance() + + val french = findViewById(R.id.thanks_french) + french.movementMethod = LinkMovementMethod.getInstance() + + val german = findViewById(R.id.thanks_german) + german.movementMethod = LinkMovementMethod.getInstance() + + val indonesian = findViewById(R.id.thanks_indonesian) + indonesian.movementMethod = LinkMovementMethod.getInstance() + + val italian = findViewById(R.id.thanks_italian) + italian.movementMethod = LinkMovementMethod.getInstance() + + val polish = findViewById(R.id.thanks_polish) + polish.movementMethod = LinkMovementMethod.getInstance() + + val swedish = findViewById(R.id.thanks_swedish) + swedish.movementMethod = LinkMovementMethod.getInstance() + } +} \ No newline at end of file diff --git a/android_app/app/src/main/res/layout/activity_thanks.xml b/android_app/app/src/main/res/layout/activity_thanks.xml new file mode 100644 index 0000000..7e1f21a --- /dev/null +++ b/android_app/app/src/main/res/layout/activity_thanks.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android_app/app/src/main/res/values-ca/strings.xml b/android_app/app/src/main/res/values-ca/strings.xml index 4a955c6..b50ff0f 100644 --- a/android_app/app/src/main/res/values-ca/strings.xml +++ b/android_app/app/src/main/res/values-ca/strings.xml @@ -68,4 +68,6 @@ Fes-ne una còpia avui Seleccionar Notes (opcional) + Gràcies + Sobre diff --git a/android_app/app/src/main/res/values-de/strings.xml b/android_app/app/src/main/res/values-de/strings.xml index 518c7ab..f7d46c5 100644 --- a/android_app/app/src/main/res/values-de/strings.xml +++ b/android_app/app/src/main/res/values-de/strings.xml @@ -68,4 +68,6 @@ Eintrag für heute kopieren Auswählen Notizen (optional) + Vielen Dank + Über diff --git a/android_app/app/src/main/res/values-es/strings.xml b/android_app/app/src/main/res/values-es/strings.xml index 8a506a4..059843d 100644 --- a/android_app/app/src/main/res/values-es/strings.xml +++ b/android_app/app/src/main/res/values-es/strings.xml @@ -67,4 +67,6 @@ Hacer copia hoy Seleccionar Notas (opcional) + Gracias + Acerca de \ No newline at end of file diff --git a/android_app/app/src/main/res/values-fi/strings.xml b/android_app/app/src/main/res/values-fi/strings.xml index e6fd4e5..d53c706 100644 --- a/android_app/app/src/main/res/values-fi/strings.xml +++ b/android_app/app/src/main/res/values-fi/strings.xml @@ -68,4 +68,6 @@ Tee kopio tänään Valitse Huomautukset (vapaaehtoinen) + Kiitos + Noin diff --git a/android_app/app/src/main/res/values-fr/strings.xml b/android_app/app/src/main/res/values-fr/strings.xml index ecb41ff..50b4c8f 100644 --- a/android_app/app/src/main/res/values-fr/strings.xml +++ b/android_app/app/src/main/res/values-fr/strings.xml @@ -68,4 +68,6 @@ Faire une copie aujourd\'hui Sélectionner Notes (optionnel) + Merci + À propos diff --git a/android_app/app/src/main/res/values-id/strings.xml b/android_app/app/src/main/res/values-id/strings.xml index 88eb66c..76e4dc5 100644 --- a/android_app/app/src/main/res/values-id/strings.xml +++ b/android_app/app/src/main/res/values-id/strings.xml @@ -68,4 +68,6 @@ Buat salinan hari ini Pilih Catatan (opsional) + Terima kasih + Tentang diff --git a/android_app/app/src/main/res/values-it/strings.xml b/android_app/app/src/main/res/values-it/strings.xml index 275c1e2..50fd000 100644 --- a/android_app/app/src/main/res/values-it/strings.xml +++ b/android_app/app/src/main/res/values-it/strings.xml @@ -67,4 +67,6 @@ Modifica Voce duplicata Voci duplicate + Grazie + Di diff --git a/android_app/app/src/main/res/values-nl/strings.xml b/android_app/app/src/main/res/values-nl/strings.xml index 4fe6f6b..e83032a 100644 --- a/android_app/app/src/main/res/values-nl/strings.xml +++ b/android_app/app/src/main/res/values-nl/strings.xml @@ -68,4 +68,6 @@ Maak vandaag een kopie Selecteeren Notities (optioneel) + Bedankt + Over diff --git a/android_app/app/src/main/res/values-pl/strings.xml b/android_app/app/src/main/res/values-pl/strings.xml index b01195d..5908558 100644 --- a/android_app/app/src/main/res/values-pl/strings.xml +++ b/android_app/app/src/main/res/values-pl/strings.xml @@ -68,4 +68,6 @@ Utworzyć dziś kopię Wybierz Notatki (opcjonalnie) + Dzięki + O diff --git a/android_app/app/src/main/res/values-sv/strings.xml b/android_app/app/src/main/res/values-sv/strings.xml index b2f64f5..b845b7c 100644 --- a/android_app/app/src/main/res/values-sv/strings.xml +++ b/android_app/app/src/main/res/values-sv/strings.xml @@ -68,4 +68,6 @@ Skapa en kopia idag Välj Anteckningar (valfritt) + Tack + Handla om diff --git a/android_app/app/src/main/res/values/strings.xml b/android_app/app/src/main/res/values/strings.xml index 9c5da96..32bf0ca 100644 --- a/android_app/app/src/main/res/values/strings.xml +++ b/android_app/app/src/main/res/values/strings.xml @@ -73,4 +73,16 @@ Make a copy today Select Notes (optional) + Thanks + About + While Contact Diary started as a solo project, it has benefited from invaluable altruistic contributions from many people. My honest thanks to everyone in this page. + Homescreen shortcuts - GenosseFlosse + Dutch translation - Tonyinspace + Finnish translation - Mikko95 + French translation - matthus + German translation - GenosseFlosse, FloEdelmann, jensMF, leso-kn and mkamp + Italian translation - igor-cali and lrt84 + Indonesian translation - hexatester + Polish translation - wasikr7 + Swedish translation - nlssn \ No newline at end of file diff --git a/android_app/app/src/main/res/xml/preferences.xml b/android_app/app/src/main/res/xml/preferences.xml index c91fb52..7652129 100644 --- a/android_app/app/src/main/res/xml/preferences.xml +++ b/android_app/app/src/main/res/xml/preferences.xml @@ -61,10 +61,22 @@ android:summary="@string/contact_developer_summary"> + + + + + + + Date: Sat, 14 Nov 2020 10:45:31 +0100 Subject: [PATCH 09/71] New list ordering Now it orders by date, and alphabetically for same date --- .../main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt index 8ca39b1..708c6b0 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt @@ -42,10 +42,12 @@ class FeedReaderDbHelper(context: Context) : SQLiteOpenHelper(context, DATABASE_ val query = if (onlyRisky) { "Select * from " + ContactDatabase.ContactDatabase.FeedEntry.TABLE_NAME + " WHERE " + ContactDatabase.ContactDatabase.FeedEntry.CLOSECONTACT_COLUMN + ">1" + - " ORDER BY " + ContactDatabase.ContactDatabase.FeedEntry.DATETIME_COLUMN + " DESC" + " ORDER BY " + ContactDatabase.ContactDatabase.FeedEntry.DATETIME_COLUMN + " DESC," + + " " + ContactDatabase.ContactDatabase.FeedEntry.NAME_COLUMN + " ASC" } else { "Select * from " + ContactDatabase.ContactDatabase.FeedEntry.TABLE_NAME + - " ORDER BY " + ContactDatabase.ContactDatabase.FeedEntry.DATETIME_COLUMN + " DESC" + " ORDER BY " + ContactDatabase.ContactDatabase.FeedEntry.DATETIME_COLUMN + " DESC," + + " " + ContactDatabase.ContactDatabase.FeedEntry.NAME_COLUMN + " ASC" } return db.rawQuery(query, null) From 7a09fa197dbbe4ae136df9773450c26cfc20465d Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sat, 14 Nov 2020 10:46:57 +0100 Subject: [PATCH 10/71] Prepare calendars for duration --- .../com/apozas/contactdiary/EditContactActivity.kt | 6 ++++++ .../java/com/apozas/contactdiary/EditEventActivity.kt | 6 ++++++ .../java/com/apozas/contactdiary/NewContactActivity.kt | 10 ++++------ .../java/com/apozas/contactdiary/NewEventActivity.kt | 10 ++++------ 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt index aac0881..b93b427 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt @@ -149,6 +149,12 @@ class EditContactActivity : AppCompatActivity() { contactCloseContactChoice = distance_group.indexOfChild(btn) } +// Handle time field + cal.set(Calendar.HOUR_OF_DAY, 0) + cal.set(Calendar.MINUTE, 0) + cal.set(Calendar.SECOND, 0) + cal.set(Calendar.MILLISECOND, 0) + // Compulsory text fields var errorCount = 0 val contactName = name_edit.text.toString() diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt index ad57c1c..7cbc5f7 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt @@ -139,6 +139,12 @@ class EditEventActivity : AppCompatActivity() { contactCloseContactChoice = eventclosecontact.indexOfChild(btn) } +// Handle time field + cal.set(Calendar.HOUR_OF_DAY, 0) + cal.set(Calendar.MINUTE, 0) + cal.set(Calendar.SECOND, 0) + cal.set(Calendar.MILLISECOND, 0) + // Compulsory text fields var errorCount = 0 val eventName = eventname_edit.text.toString() diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt index f6608f7..5a9f446 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt @@ -133,12 +133,10 @@ class NewContactActivity : AppCompatActivity() { } // Handle time field - if (time_input.text.toString() == "") { - cal.set(Calendar.HOUR_OF_DAY, 0) - cal.set(Calendar.MINUTE, 0) - cal.set(Calendar.SECOND, 0) - cal.set(Calendar.MILLISECOND, 0) - } + cal.set(Calendar.HOUR_OF_DAY, 0) + cal.set(Calendar.MINUTE, 0) + cal.set(Calendar.SECOND, 0) + cal.set(Calendar.MILLISECOND, 0) // Create a new map of values, where column names are the keys if (errorCount == 0) { diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt index d96bfdc..6869ad6 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt @@ -126,12 +126,10 @@ class NewEventActivity : AppCompatActivity() { } // Handle time field - if (eventtime_input.text.toString() == "") { - cal.set(Calendar.HOUR_OF_DAY, 0) - cal.set(Calendar.MINUTE, 0) - cal.set(Calendar.SECOND, 0) - cal.set(Calendar.MILLISECOND, 0) - } + cal.set(Calendar.HOUR_OF_DAY, 0) + cal.set(Calendar.MINUTE, 0) + cal.set(Calendar.SECOND, 0) + cal.set(Calendar.MILLISECOND, 0) // Create a new map of values, where column names are the keys if (errorCount == 0) { From 4295aeb3d4ecdc38e677a9ac6b8cf57ae08870ef Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sat, 14 Nov 2020 12:08:21 +0100 Subject: [PATCH 11/71] Update database Add duration, migrate to DATETIME_COLUMN only storing date information --- .../apozas/contactdiary/ContactDatabase.kt | 4 +++ .../apozas/contactdiary/FeedReaderDbHelper.kt | 8 +++-- .../com/apozas/contactdiary/MigrationTools.kt | 35 +++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/ContactDatabase.kt b/android_app/app/src/main/java/com/apozas/contactdiary/ContactDatabase.kt index f49c1b0..3025340 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/ContactDatabase.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/ContactDatabase.kt @@ -26,6 +26,7 @@ class ContactDatabase { const val NAME_COLUMN = "Name" const val PLACE_COLUMN = "Place" const val DATETIME_COLUMN = "Timestamp" + const val DURATION_COLUMN = "Duration" const val PHONE_COLUMN = "Phone" const val RELATIVE_COLUMN = "Relative" const val COMPANIONS_COLUMN = "Companions" @@ -43,6 +44,7 @@ class ContactDatabase { "${ContactDatabase.FeedEntry.NAME_COLUMN} TEXT," + "${ContactDatabase.FeedEntry.PLACE_COLUMN} TEXT," + "${ContactDatabase.FeedEntry.DATETIME_COLUMN} INT," + + "${ContactDatabase.FeedEntry.DURATION_COLUMN} INT," + "${ContactDatabase.FeedEntry.PHONE_COLUMN} TEXT," + "${ContactDatabase.FeedEntry.RELATIVE_COLUMN} TINYINT," + "${ContactDatabase.FeedEntry.COMPANIONS_COLUMN} TEXT," + @@ -52,5 +54,7 @@ class ContactDatabase { const val SQL_DELETE_ENTRIES = "DROP TABLE IF EXISTS ${ContactDatabase.FeedEntry.TABLE_NAME}" const val SQL_UPDATE_2 = "ALTER TABLE ${ContactDatabase.FeedEntry.TABLE_NAME} ADD COLUMN " + "${ContactDatabase.FeedEntry.NOTES_COLUMN} TEXT" + const val SQL_UPDATE_3 = "ALTER TABLE ${ContactDatabase.FeedEntry.TABLE_NAME} ADD COLUMN " + + "${ContactDatabase.FeedEntry.DURATION_COLUMN} INT" } } \ No newline at end of file diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt index 708c6b0..8f12aae 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt @@ -26,13 +26,17 @@ class FeedReaderDbHelper(context: Context) : SQLiteOpenHelper(context, DATABASE_ } override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) { if (oldVersion < 2) { db.execSQL(ContactDatabase.SQL_UPDATE_2) } + if (oldVersion < 3) { + db.execSQL(ContactDatabase.SQL_UPDATE_3) + MigrationTools().migrateTo3(db) + } } override fun onDowngrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) { - onUpgrade(db, oldVersion, newVersion) +// onUpgrade(db, oldVersion, newVersion) } companion object { // If you change the database schema, you must increment the database version. - const val DATABASE_VERSION = 2 + const val DATABASE_VERSION = 3 const val DATABASE_NAME = "ContactDiary.db" } diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt b/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt new file mode 100644 index 0000000..019cc58 --- /dev/null +++ b/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt @@ -0,0 +1,35 @@ +package com.apozas.contactdiary + +import android.content.ContentValues +import android.database.sqlite.SQLiteDatabase +import java.util.* + +class MigrationTools { + val cal: Calendar = Calendar.getInstance() + private val feedEntry = ContactDatabase.ContactDatabase.FeedEntry + + fun migrateTo3 (dataBase: SQLiteDatabase) { + val query = "Select * from " + feedEntry.TABLE_NAME + val cursor = dataBase.rawQuery(query, null) + + cursor.use { cursor -> + while (cursor.moveToNext()) { + val id = cursor.getInt(cursor.getColumnIndex("_id")) + val time = cursor.getLong(cursor.getColumnIndex(feedEntry.DATETIME_COLUMN)) + cal.timeInMillis = time + cal.set(Calendar.HOUR, 0) + cal.set(Calendar.MINUTE, 0) + cal.set(Calendar.SECOND, 0) + cal.set(Calendar.MILLISECOND, 0) + + val values = ContentValues().apply { + put(feedEntry.DATETIME_COLUMN, cal.timeInMillis) + } +// Update the database + val selection = "_id LIKE ?" + val selectionArgs = arrayOf(id.toString()) + dataBase.update(feedEntry.TABLE_NAME, values, selection, selectionArgs) + } + } + } +} \ No newline at end of file From 9befcda1516023903ee30425bd9149332271a748 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sat, 14 Nov 2020 12:13:02 +0100 Subject: [PATCH 12/71] Rename DATETIME to TIMESTAMP --- .../java/com/apozas/contactdiary/ContactDatabase.kt | 4 ++-- .../java/com/apozas/contactdiary/DataCursorAdapter.kt | 2 +- .../com/apozas/contactdiary/EditContactActivity.kt | 8 ++++---- .../java/com/apozas/contactdiary/EditEventActivity.kt | 10 +++++----- .../java/com/apozas/contactdiary/FeedReaderDbHelper.kt | 4 ++-- .../main/java/com/apozas/contactdiary/MainActivity.kt | 6 +++--- .../java/com/apozas/contactdiary/MigrationTools.kt | 4 ++-- .../java/com/apozas/contactdiary/NewContactActivity.kt | 2 +- .../java/com/apozas/contactdiary/NewEventActivity.kt | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/ContactDatabase.kt b/android_app/app/src/main/java/com/apozas/contactdiary/ContactDatabase.kt index 3025340..7ae00ae 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/ContactDatabase.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/ContactDatabase.kt @@ -25,7 +25,7 @@ class ContactDatabase { const val TYPE_COLUMN = "Type" const val NAME_COLUMN = "Name" const val PLACE_COLUMN = "Place" - const val DATETIME_COLUMN = "Timestamp" + const val TIMESTAMP_COLUMN = "Timestamp" const val DURATION_COLUMN = "Duration" const val PHONE_COLUMN = "Phone" const val RELATIVE_COLUMN = "Relative" @@ -43,7 +43,7 @@ class ContactDatabase { "${ContactDatabase.FeedEntry.TYPE_COLUMN} TEXT," + "${ContactDatabase.FeedEntry.NAME_COLUMN} TEXT," + "${ContactDatabase.FeedEntry.PLACE_COLUMN} TEXT," + - "${ContactDatabase.FeedEntry.DATETIME_COLUMN} INT," + + "${ContactDatabase.FeedEntry.TIMESTAMP_COLUMN} INT," + "${ContactDatabase.FeedEntry.DURATION_COLUMN} INT," + "${ContactDatabase.FeedEntry.PHONE_COLUMN} TEXT," + "${ContactDatabase.FeedEntry.RELATIVE_COLUMN} TINYINT," + diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/DataCursorAdapter.kt b/android_app/app/src/main/java/com/apozas/contactdiary/DataCursorAdapter.kt index c347fcd..479c782 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/DataCursorAdapter.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/DataCursorAdapter.kt @@ -26,7 +26,7 @@ import java.text.DateFormat import java.util.* class DataCursorAdapter(context: Context?, c: Cursor?) : CursorAdapter(context, c, 0) { - private var mDateColumnIndex = cursor.getColumnIndex(ContactDatabase.ContactDatabase.FeedEntry.DATETIME_COLUMN) + private var mDateColumnIndex = cursor.getColumnIndex(ContactDatabase.ContactDatabase.FeedEntry.TIMESTAMP_COLUMN) private val formatter: DateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM) private val inflater = context?.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt index b93b427..d1e64cc 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt @@ -58,7 +58,7 @@ class EditContactActivity : AppCompatActivity() { name_edit.setText(cursor.getString(cursor.getColumnIndex(feedEntry.NAME_COLUMN))) place_edit.setText(cursor.getString(cursor.getColumnIndex(feedEntry.PLACE_COLUMN))) - val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.DATETIME_COLUMN)) + val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.TIMESTAMP_COLUMN)) val cal = Calendar.getInstance() cal.timeInMillis = timestamp @@ -174,7 +174,7 @@ class EditContactActivity : AppCompatActivity() { put(feedEntry.TYPE_COLUMN, "Contact") put(feedEntry.NAME_COLUMN, contactName) put(feedEntry.PLACE_COLUMN, contactPlace) - put(feedEntry.DATETIME_COLUMN, cal.timeInMillis) + put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) put(feedEntry.PHONE_COLUMN, phone_edit.text.toString()) put(feedEntry.RELATIVE_COLUMN, relativeChoice) put(feedEntry.CLOSECONTACT_COLUMN, contactCloseContactChoice) @@ -220,7 +220,7 @@ class EditContactActivity : AppCompatActivity() { ) cursor.moveToFirst() - val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.DATETIME_COLUMN)) + val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.TIMESTAMP_COLUMN)) val cal = Calendar.getInstance() cal.timeInMillis = timestamp cal.set(Calendar.DAY_OF_YEAR, Calendar.getInstance().get(Calendar.DAY_OF_YEAR)) @@ -229,7 +229,7 @@ class EditContactActivity : AppCompatActivity() { put(feedEntry.TYPE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.TYPE_COLUMN))) put(feedEntry.NAME_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.NAME_COLUMN))) put(feedEntry.PLACE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PLACE_COLUMN))) - put(feedEntry.DATETIME_COLUMN, cal.timeInMillis) + put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) put(feedEntry.PHONE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PHONE_COLUMN))) put(feedEntry.RELATIVE_COLUMN, cursor.getInt(cursor.getColumnIndex(feedEntry.RELATIVE_COLUMN))) put(feedEntry.COMPANIONS_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.COMPANIONS_COLUMN))) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt index 7cbc5f7..2a7ce9f 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt @@ -59,7 +59,7 @@ class EditEventActivity : AppCompatActivity() { eventname_edit.setText(cursor.getString(cursor.getColumnIndex(feedEntry.NAME_COLUMN))) eventplace_edit.setText(cursor.getString(cursor.getColumnIndex(feedEntry.PLACE_COLUMN))) - val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.DATETIME_COLUMN)) + val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.TIMESTAMP_COLUMN)) val cal = Calendar.getInstance() cal.timeInMillis = timestamp @@ -163,7 +163,7 @@ class EditEventActivity : AppCompatActivity() { put(feedEntry.TYPE_COLUMN, "Event") put(feedEntry.NAME_COLUMN, eventName) put(feedEntry.PLACE_COLUMN, eventPlace) - put(feedEntry.DATETIME_COLUMN, cal.timeInMillis) + put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) put(feedEntry.PHONE_COLUMN, eventphone_edit.text.toString()) put(feedEntry.COMPANIONS_COLUMN, eventpeople_edit.text.toString()) put(feedEntry.CLOSECONTACT_COLUMN, contactCloseContactChoice) @@ -171,7 +171,7 @@ class EditEventActivity : AppCompatActivity() { put(feedEntry.NOTES_COLUMN, eventnotes_edit.text.toString()) } -// Update the database +// Update the database val selection = "_id LIKE ?" val selectionArgs = arrayOf(info.toString()) db.update(feedEntry.TABLE_NAME, values, selection, selectionArgs) @@ -211,7 +211,7 @@ class EditEventActivity : AppCompatActivity() { ) cursor.moveToFirst() - val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.DATETIME_COLUMN)) + val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.TIMESTAMP_COLUMN)) val cal = Calendar.getInstance() cal.timeInMillis = timestamp cal.set(Calendar.DAY_OF_YEAR, Calendar.getInstance().get(Calendar.DAY_OF_YEAR)) @@ -220,7 +220,7 @@ class EditEventActivity : AppCompatActivity() { put(feedEntry.TYPE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.TYPE_COLUMN))) put(feedEntry.NAME_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.NAME_COLUMN))) put(feedEntry.PLACE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PLACE_COLUMN))) - put(feedEntry.DATETIME_COLUMN, cal.timeInMillis) + put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) put(feedEntry.PHONE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PHONE_COLUMN))) put(feedEntry.RELATIVE_COLUMN, cursor.getInt(cursor.getColumnIndex(feedEntry.RELATIVE_COLUMN))) put(feedEntry.COMPANIONS_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.COMPANIONS_COLUMN))) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt index 8f12aae..6f1137a 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt @@ -46,11 +46,11 @@ class FeedReaderDbHelper(context: Context) : SQLiteOpenHelper(context, DATABASE_ val query = if (onlyRisky) { "Select * from " + ContactDatabase.ContactDatabase.FeedEntry.TABLE_NAME + " WHERE " + ContactDatabase.ContactDatabase.FeedEntry.CLOSECONTACT_COLUMN + ">1" + - " ORDER BY " + ContactDatabase.ContactDatabase.FeedEntry.DATETIME_COLUMN + " DESC," + + " ORDER BY " + ContactDatabase.ContactDatabase.FeedEntry.TIMESTAMP_COLUMN + " DESC," + " " + ContactDatabase.ContactDatabase.FeedEntry.NAME_COLUMN + " ASC" } else { "Select * from " + ContactDatabase.ContactDatabase.FeedEntry.TABLE_NAME + - " ORDER BY " + ContactDatabase.ContactDatabase.FeedEntry.DATETIME_COLUMN + " DESC," + + " ORDER BY " + ContactDatabase.ContactDatabase.FeedEntry.TIMESTAMP_COLUMN + " DESC," + " " + ContactDatabase.ContactDatabase.FeedEntry.NAME_COLUMN + " ASC" } diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/MainActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/MainActivity.kt index 7c6ab1a..0bd32b9 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/MainActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/MainActivity.kt @@ -282,7 +282,7 @@ class MainActivity : AppCompatActivity() { // Define 'where' part of query. val selection = "DELETE FROM ${ContactDatabase.ContactDatabase.FeedEntry.TABLE_NAME} " + - "WHERE ${ContactDatabase.ContactDatabase.FeedEntry.DATETIME_COLUMN} <= " + fifteenDaysAgo.toString() + "WHERE ${ContactDatabase.ContactDatabase.FeedEntry.TIMESTAMP_COLUMN} <= " + fifteenDaysAgo.toString() // Issue SQL statement. db.execSQL(selection) } @@ -300,7 +300,7 @@ class MainActivity : AppCompatActivity() { ) cursor.moveToFirst() - val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.DATETIME_COLUMN)) + val timestamp = cursor.getLong(cursor.getColumnIndex(feedEntry.TIMESTAMP_COLUMN)) val cal = Calendar.getInstance() cal.timeInMillis = timestamp cal.set(Calendar.DAY_OF_YEAR, Calendar.getInstance().get(Calendar.DAY_OF_YEAR)) @@ -309,7 +309,7 @@ class MainActivity : AppCompatActivity() { put(feedEntry.TYPE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.TYPE_COLUMN))) put(feedEntry.NAME_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.NAME_COLUMN))) put(feedEntry.PLACE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PLACE_COLUMN))) - put(feedEntry.DATETIME_COLUMN, cal.timeInMillis) + put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) put(feedEntry.PHONE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PHONE_COLUMN))) put(feedEntry.RELATIVE_COLUMN, cursor.getInt(cursor.getColumnIndex(feedEntry.RELATIVE_COLUMN))) put(feedEntry.COMPANIONS_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.COMPANIONS_COLUMN))) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt b/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt index 019cc58..cdb83ab 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt @@ -15,7 +15,7 @@ class MigrationTools { cursor.use { cursor -> while (cursor.moveToNext()) { val id = cursor.getInt(cursor.getColumnIndex("_id")) - val time = cursor.getLong(cursor.getColumnIndex(feedEntry.DATETIME_COLUMN)) + val time = cursor.getLong(cursor.getColumnIndex(feedEntry.TIMESTAMP_COLUMN)) cal.timeInMillis = time cal.set(Calendar.HOUR, 0) cal.set(Calendar.MINUTE, 0) @@ -23,7 +23,7 @@ class MigrationTools { cal.set(Calendar.MILLISECOND, 0) val values = ContentValues().apply { - put(feedEntry.DATETIME_COLUMN, cal.timeInMillis) + put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) } // Update the database val selection = "_id LIKE ?" diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt index 5a9f446..412a18c 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt @@ -144,7 +144,7 @@ class NewContactActivity : AppCompatActivity() { put(feedEntry.TYPE_COLUMN, "Contact") put(feedEntry.NAME_COLUMN, contactName) put(feedEntry.PLACE_COLUMN, contactPlace) - put(feedEntry.DATETIME_COLUMN, cal.timeInMillis) + put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) put(feedEntry.PHONE_COLUMN, phone_input.text.toString()) put(feedEntry.RELATIVE_COLUMN, relativeChoice) put(feedEntry.CLOSECONTACT_COLUMN, contactCloseContactChoice) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt index 6869ad6..9cb6639 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt @@ -137,7 +137,7 @@ class NewEventActivity : AppCompatActivity() { put(feedEntry.TYPE_COLUMN, "Event") put(feedEntry.NAME_COLUMN, eventName) put(feedEntry.PLACE_COLUMN, eventPlace) - put(feedEntry.DATETIME_COLUMN, cal.timeInMillis) + put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) put(feedEntry.PHONE_COLUMN, eventphone_input.text.toString()) put(feedEntry.COMPANIONS_COLUMN, eventpeople_input.text.toString()) put(feedEntry.ENCOUNTER_COLUMN, eventIndoorOutdoorChoice) From 0c4dd747b268887598269ef23d6b01f0ca187c17 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 15 Nov 2020 10:58:50 +0100 Subject: [PATCH 13/71] Add forgotten disclaimer --- .../com/apozas/contactdiary/MigrationTools.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt b/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt index cdb83ab..f8fd48b 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt @@ -1,5 +1,20 @@ package com.apozas.contactdiary +/* + This file is part of Contact Diary. + Contact Diary is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + Contact Diary is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with Contact Diary. If not, see . + Copyright 2020 by Alex Pozas-Kerstjens (apozas) +*/ + import android.content.ContentValues import android.database.sqlite.SQLiteDatabase import java.util.* From 7edbcb915df87dc3986c767978dc5db5ef9caa48 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 15 Nov 2020 17:48:11 +0100 Subject: [PATCH 14/71] Update translations --- android_app/app/src/main/res/values-ca/strings.xml | 10 ++++++++++ android_app/app/src/main/res/values-de/strings.xml | 10 ++++++++++ android_app/app/src/main/res/values-es/strings.xml | 10 ++++++++++ android_app/app/src/main/res/values-id/strings.xml | 10 ++++++++++ 4 files changed, 40 insertions(+) diff --git a/android_app/app/src/main/res/values-ca/strings.xml b/android_app/app/src/main/res/values-ca/strings.xml index b50ff0f..6087e2c 100644 --- a/android_app/app/src/main/res/values-ca/strings.xml +++ b/android_app/app/src/main/res/values-ca/strings.xml @@ -70,4 +70,14 @@ Notes (opcional) Gràcies Sobre + Encara que Diari de Contactes va començar com un projecte en solitari, es va beneficiar d\'inestimables aportacions altruistes de moltes persones. El meu sincer agraïment a tothom en aquesta pàgina. + Dreceres de pantalla d\'inici - GenosseFlosse + Traducció a l\'holandès - Tonyinspace + Traducció al finlandès - Mikko95 + Traducció al francès- matthus + Traducció a l\'alemany - GenosseFlosse, FloEdelmann, jensMF, leso-kn and mkamp + Traducció a l\'italià - igor-cali and lrt84 + Traducció a l\'indonesi - hexatester + Traducció al polonès - wasikr7 + Traducció al suec - nlssn diff --git a/android_app/app/src/main/res/values-de/strings.xml b/android_app/app/src/main/res/values-de/strings.xml index f7d46c5..0f57d78 100644 --- a/android_app/app/src/main/res/values-de/strings.xml +++ b/android_app/app/src/main/res/values-de/strings.xml @@ -70,4 +70,14 @@ Notizen (optional) Vielen Dank Über + Während Kontakttagebuch als Einzelprojekt begann, profitierte es von wertvollen, altruistischen Beiträgen vieler Menschen. Mein aufrichtiger Dank an alle auf dieser Seite genannten. + Schnellzugriffe für den Startbildschirm - GenosseFlosse + Niederländische Übersetzung - Tonyinspace + Finnische Übersetzung - Mikko95 + Französische Übersetzung - matthus + Deutsche Übersetzung - GenosseFlosse, FloEdelmann, jensMF, leso-kn und mkamp + Italienische Übersetzung - igor-cali und lrt84 + Indonesische Übersetzung - hexatester + Polnische Übersetzung - wasikr7 + Schwedische Übersetzung - nlssn diff --git a/android_app/app/src/main/res/values-es/strings.xml b/android_app/app/src/main/res/values-es/strings.xml index 059843d..a56a6bb 100644 --- a/android_app/app/src/main/res/values-es/strings.xml +++ b/android_app/app/src/main/res/values-es/strings.xml @@ -69,4 +69,14 @@ Notas (opcional) Gracias Acerca de + Aunque Diario de Contactos comenzó como un proyecto en solitario, se ha beneficiado de las invaluables contribuciones altruistas de muchas personas. Mi más sincero agradecimiento a todos en esta página. + Accesos directos - GenosseFlosse + Traducción al holandés - Tonyinspace + Traducción al finlandés - Mikko95 + Traducción al francés - matthus + Traducción al alemán - GenosseFlosse, FloEdelmann, jensMF, leso-kn and mkamp + Traducción al italiano - igor-cali and lrt84 + Traducción al indonesio - hexatester + Traducción al polaco - wasikr7 + Traducción al sueco - nlssn \ No newline at end of file diff --git a/android_app/app/src/main/res/values-id/strings.xml b/android_app/app/src/main/res/values-id/strings.xml index 76e4dc5..d3a6b7b 100644 --- a/android_app/app/src/main/res/values-id/strings.xml +++ b/android_app/app/src/main/res/values-id/strings.xml @@ -70,4 +70,14 @@ Catatan (opsional) Terima kasih Tentang + Meskipun Catatan Kontak dimulai sebagai proyek solo, ia memperoleh manfaat dari kontribusi altruistik yang tak ternilai dari banyak orang. Terima kasih yang tulus kepada semua orang di halaman ini. + Pintasan layar beranda - GenosseFlosse + Terjemahan bahasa Belanda - Tonyinspace + Terjemahan bahasa Finlandia - Mikko95 + Terjemahan bahasa Perancis - matthus + Terjemahan bahasa Jerman - GenosseFlosse, FloEdelmann, jensMF, leso-kn dan mkamp + Terjemahan bahasa Italia - igor-cali dan lrt84 + Terjemahan bahasa Indonesia - hexatester + Terjemahan bahasa Polandia - wasikr7 + Terjemahan bahasa Swedia - nlssn From b9603bb846b44b307feef3f7a018528a4cfd5282 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 15 Nov 2020 18:22:48 +0100 Subject: [PATCH 15/71] Replace Time by Duration --- .../contactdiary/EditContactActivity.kt | 75 +++++++++++++----- .../apozas/contactdiary/EditEventActivity.kt | 77 +++++++++++++++---- .../apozas/contactdiary/FeedReaderDbHelper.kt | 2 +- .../com/apozas/contactdiary/MainActivity.kt | 1 + .../com/apozas/contactdiary/MigrationTools.kt | 1 + .../apozas/contactdiary/NewContactActivity.kt | 71 +++++++++++++---- .../apozas/contactdiary/NewEventActivity.kt | 67 ++++++++++++---- .../main/res/layout/activity_addcontact.xml | 2 +- .../src/main/res/layout/duration_dialog.xml | 19 +++++ .../app/src/main/res/values-ca/strings.xml | 5 +- .../app/src/main/res/values-de/strings.xml | 5 +- .../app/src/main/res/values-es/strings.xml | 5 +- .../app/src/main/res/values-fi/strings.xml | 5 +- .../app/src/main/res/values-fr/strings.xml | 5 +- .../app/src/main/res/values-id/strings.xml | 5 +- .../app/src/main/res/values-it/strings.xml | 5 +- .../app/src/main/res/values-nl/strings.xml | 5 +- .../app/src/main/res/values-pl/strings.xml | 5 +- .../app/src/main/res/values-sv/strings.xml | 5 +- .../app/src/main/res/values/strings.xml | 7 +- 20 files changed, 289 insertions(+), 83 deletions(-) create mode 100644 android_app/app/src/main/res/layout/duration_dialog.xml diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt index d1e64cc..2965e89 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/EditContactActivity.kt @@ -16,18 +16,19 @@ package com.apozas.contactdiary */ import android.app.DatePickerDialog -import android.app.TimePickerDialog import android.content.ContentValues import android.content.Context +import android.content.DialogInterface import android.database.Cursor import android.os.Bundle -import android.text.format.DateFormat.is24HourFormat import android.view.View import android.view.ViewGroup +import android.view.WindowManager import android.view.inputmethod.InputMethodManager import android.widget.EditText import android.widget.RadioButton import android.widget.Toast +import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import kotlinx.android.synthetic.main.activity_editcontact.* import java.text.DateFormat @@ -63,7 +64,7 @@ class EditContactActivity : AppCompatActivity() { cal.timeInMillis = timestamp date_edit.setText(DateFormat.getDateInstance(DateFormat.MEDIUM).format(cal.time)) - time_edit.setText(DateFormat.getTimeInstance(DateFormat.SHORT).format(cal.time)) + time_edit.setText(minutesToText(cursor.getInt(cursor.getColumnIndex(feedEntry.DURATION_COLUMN)))) if (cursor.getString(cursor.getColumnIndex(feedEntry.PHONE_COLUMN)) != ""){ phone_edit.setText(cursor.getString(cursor.getColumnIndex(feedEntry.PHONE_COLUMN))) @@ -108,22 +109,28 @@ class EditContactActivity : AppCompatActivity() { ).show() } - val timeSetListener = TimePickerDialog.OnTimeSetListener { _, hour, minute -> - cal.set(Calendar.HOUR_OF_DAY, hour) - cal.set(Calendar.MINUTE, minute) - - time_edit.setText(DateFormat.getTimeInstance(DateFormat.SHORT).format(cal.time)) - - } - - val is24Hour = is24HourFormat(applicationContext) time_edit.setOnClickListener { - TimePickerDialog( - this@EditContactActivity, timeSetListener, - cal.get(Calendar.HOUR_OF_DAY), - cal.get(Calendar.MINUTE), - is24Hour - ).show() + val builder = AlertDialog.Builder(this) + val dialogView = layoutInflater.inflate(R.layout.duration_dialog, null) + val durationText = dialogView.findViewById(R.id.duration) + builder.setView(dialogView) + builder.setTitle(getString(R.string.contact_duration_title)) + durationText.hint = getString(R.string.duration_instructions) + builder.setPositiveButton("OK", DialogInterface.OnClickListener { _, _ -> + val durationText = durationStringToText(durationText.text.toString()) + if (durationText.isEmpty()) { + Toast.makeText(this, + R.string.incorrect_alarm_time, + Toast.LENGTH_LONG).show() + } else { time_edit.setText(durationText) } + }) + builder.setNegativeButton("cancel", DialogInterface.OnClickListener { dialog, _ -> + dialog.dismiss() + }) + val dialog = builder.create() + dialog.window?.setSoftInputMode( + WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); + dialog.show() } okButton_AddContact.setOnClickListener { @@ -167,6 +174,15 @@ class EditContactActivity : AppCompatActivity() { place_edit.error = getString(R.string.compulsory_field) errorCount++ } + val durationText = time_edit.text.toString() + var contactDuration = 0 + if (durationText.isEmpty()) { + time_edit.error = getString(R.string.compulsory_field) + errorCount++ + } else { + val durationParts = durationText.split('h') + contactDuration = durationParts[0].toInt() * 60 + durationParts[1].dropLast(1).toInt() + } // Create new row if (errorCount == 0) { @@ -175,6 +191,7 @@ class EditContactActivity : AppCompatActivity() { put(feedEntry.NAME_COLUMN, contactName) put(feedEntry.PLACE_COLUMN, contactPlace) put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) + put(feedEntry.DURATION_COLUMN, contactDuration) put(feedEntry.PHONE_COLUMN, phone_edit.text.toString()) put(feedEntry.RELATIVE_COLUMN, relativeChoice) put(feedEntry.CLOSECONTACT_COLUMN, contactCloseContactChoice) @@ -230,6 +247,7 @@ class EditContactActivity : AppCompatActivity() { put(feedEntry.NAME_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.NAME_COLUMN))) put(feedEntry.PLACE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PLACE_COLUMN))) put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) + put(feedEntry.DURATION_COLUMN, cursor.getInt(cursor.getColumnIndex(feedEntry.DURATION_COLUMN))) put(feedEntry.PHONE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PHONE_COLUMN))) put(feedEntry.RELATIVE_COLUMN, cursor.getInt(cursor.getColumnIndex(feedEntry.RELATIVE_COLUMN))) put(feedEntry.COMPANIONS_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.COMPANIONS_COLUMN))) @@ -272,4 +290,25 @@ class EditContactActivity : AppCompatActivity() { inputMethodManager.hideSoftInputFromWindow(currentFocus?.windowToken, 0) } + private fun durationStringToText(durationString: String): String { + var durationText = "" + val durationSplit = durationString.split(":") + if (durationSplit.size == 2) { + if (durationSplit[1].toInt() < 60) { + durationText = durationSplit[0].toInt().toString() + "h" + + durationSplit[1].toInt().toString() + "m" + } + } else if (durationSplit.size == 1) { + val hours = durationString.toInt() / 60 + val minutes = durationString.toInt() % 60 + durationText = hours.toString() + "h" + minutes.toString() + "m" + } + return durationText + } + + private fun minutesToText(duration: Int): String { + val hours = duration / 60 + val minutes = duration % 60 + return hours.toString() + "h" + minutes.toString() + "m" + } } diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt index 2a7ce9f..07e2dea 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/EditEventActivity.kt @@ -19,15 +19,17 @@ import android.app.DatePickerDialog import android.app.TimePickerDialog import android.content.ContentValues import android.content.Context +import android.content.DialogInterface import android.database.Cursor import android.os.Bundle -import android.text.format.DateFormat.is24HourFormat import android.view.View import android.view.ViewGroup +import android.view.WindowManager import android.view.inputmethod.InputMethodManager import android.widget.EditText import android.widget.RadioButton import android.widget.Toast +import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import kotlinx.android.synthetic.main.activity_editevent.* import java.text.DateFormat @@ -64,7 +66,8 @@ class EditEventActivity : AppCompatActivity() { cal.timeInMillis = timestamp eventdate_edit.setText(DateFormat.getDateInstance(DateFormat.MEDIUM).format(cal.time)) - eventtime_edit.setText(DateFormat.getTimeInstance(DateFormat.SHORT).format(cal.time)) + eventtime_edit.setText(minutesToText(cursor.getInt(cursor.getColumnIndex(feedEntry.DURATION_COLUMN)))) + if (cursor.getString(cursor.getColumnIndex(feedEntry.COMPANIONS_COLUMN)) != ""){ eventpeople_edit.setText(cursor.getString(cursor.getColumnIndex(feedEntry.COMPANIONS_COLUMN))) } @@ -105,22 +108,28 @@ class EditEventActivity : AppCompatActivity() { ).show() } - val timeSetListener = TimePickerDialog.OnTimeSetListener { _, hour, minute -> - cal.set(Calendar.HOUR_OF_DAY, hour) - cal.set(Calendar.MINUTE, minute) - - eventtime_edit.setText(DateFormat.getTimeInstance(DateFormat.SHORT).format(cal.time)) - - } - - val is24Hour = is24HourFormat(applicationContext) eventtime_edit.setOnClickListener { - TimePickerDialog( - this@EditEventActivity, timeSetListener, - cal.get(Calendar.HOUR_OF_DAY), - cal.get(Calendar.MINUTE), - is24Hour - ).show() + val builder = AlertDialog.Builder(this) + val dialogView = layoutInflater.inflate(R.layout.duration_dialog, null) + val durationText = dialogView.findViewById(R.id.duration) + builder.setView(dialogView) + builder.setTitle(getString(R.string.event_duration_title)) + durationText.hint = getString(R.string.duration_instructions) + builder.setPositiveButton("OK", DialogInterface.OnClickListener { _, _ -> + val durationText = durationStringToText(durationText.text.toString()) + if (durationText.isEmpty()) { + Toast.makeText(this, + R.string.incorrect_alarm_time, + Toast.LENGTH_LONG).show() + } else { eventtime_edit.setText(durationText) } + }) + builder.setNegativeButton("cancel", DialogInterface.OnClickListener { dialog, _ -> + dialog.dismiss() + }) + val dialog = builder.create() + dialog.window?.setSoftInputMode( + WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); + dialog.show() } okButton_AddEvent.setOnClickListener { @@ -157,6 +166,16 @@ class EditEventActivity : AppCompatActivity() { eventplace_edit.error = getString(R.string.compulsory_field) errorCount++ } + val durationText = eventtime_edit.text.toString() + var eventDuration = 0 + if (durationText.isEmpty()) { + eventtime_edit.error = getString(R.string.compulsory_field) + errorCount++ + } else { + val durationParts = durationText.split('h') + eventDuration = durationParts[0].toInt() * 60 + durationParts[1].dropLast(1).toInt() + } + // Create new row if (errorCount == 0) { val values = ContentValues().apply { @@ -164,6 +183,7 @@ class EditEventActivity : AppCompatActivity() { put(feedEntry.NAME_COLUMN, eventName) put(feedEntry.PLACE_COLUMN, eventPlace) put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) + put(feedEntry.DURATION_COLUMN, eventDuration) put(feedEntry.PHONE_COLUMN, eventphone_edit.text.toString()) put(feedEntry.COMPANIONS_COLUMN, eventpeople_edit.text.toString()) put(feedEntry.CLOSECONTACT_COLUMN, contactCloseContactChoice) @@ -221,6 +241,7 @@ class EditEventActivity : AppCompatActivity() { put(feedEntry.NAME_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.NAME_COLUMN))) put(feedEntry.PLACE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PLACE_COLUMN))) put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) + put(feedEntry.DURATION_COLUMN, cursor.getInt(cursor.getColumnIndex(feedEntry.DURATION_COLUMN))) put(feedEntry.PHONE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PHONE_COLUMN))) put(feedEntry.RELATIVE_COLUMN, cursor.getInt(cursor.getColumnIndex(feedEntry.RELATIVE_COLUMN))) put(feedEntry.COMPANIONS_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.COMPANIONS_COLUMN))) @@ -265,4 +286,26 @@ class EditEventActivity : AppCompatActivity() { getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager inputMethodManager.hideSoftInputFromWindow(currentFocus?.windowToken, 0) } + + private fun durationStringToText(durationString: String): String { + var durationText = "" + val durationSplit = durationString.split(":") + if (durationSplit.size == 2) { + if (durationSplit[1].toInt() < 60) { + durationText = durationSplit[0].toInt().toString() + "h" + + durationSplit[1].toInt().toString() + "m" + } + } else if (durationSplit.size == 1) { + val hours = durationString.toInt() / 60 + val minutes = durationString.toInt() % 60 + durationText = hours.toString() + "h" + minutes.toString() + "m" + } + return durationText + } + + private fun minutesToText(duration: Int): String { + val hours = duration / 60 + val minutes = duration % 60 + return hours.toString() + "h" + minutes.toString() + "m" + } } diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt index 6f1137a..999880f 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/FeedReaderDbHelper.kt @@ -27,7 +27,7 @@ class FeedReaderDbHelper(context: Context) : SQLiteOpenHelper(context, DATABASE_ override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) { if (oldVersion < 2) { db.execSQL(ContactDatabase.SQL_UPDATE_2) } if (oldVersion < 3) { - db.execSQL(ContactDatabase.SQL_UPDATE_3) + db.execSQL(ContactDatabase.SQL_UPDATE_3) MigrationTools().migrateTo3(db) } } diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/MainActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/MainActivity.kt index 0bd32b9..39ab8d1 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/MainActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/MainActivity.kt @@ -310,6 +310,7 @@ class MainActivity : AppCompatActivity() { put(feedEntry.NAME_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.NAME_COLUMN))) put(feedEntry.PLACE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PLACE_COLUMN))) put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) + put(feedEntry.DURATION_COLUMN, cursor.getInt(cursor.getColumnIndex(feedEntry.DURATION_COLUMN))) put(feedEntry.PHONE_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.PHONE_COLUMN))) put(feedEntry.RELATIVE_COLUMN, cursor.getInt(cursor.getColumnIndex(feedEntry.RELATIVE_COLUMN))) put(feedEntry.COMPANIONS_COLUMN, cursor.getString(cursor.getColumnIndex(feedEntry.COMPANIONS_COLUMN))) diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt b/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt index f8fd48b..3f1c1fd 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/MigrationTools.kt @@ -39,6 +39,7 @@ class MigrationTools { val values = ContentValues().apply { put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) + put(feedEntry.DURATION_COLUMN, 60) } // Update the database val selection = "_id LIKE ?" diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt index 412a18c..bae1e9b 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/NewContactActivity.kt @@ -16,16 +16,17 @@ package com.apozas.contactdiary */ import android.app.DatePickerDialog -import android.app.TimePickerDialog import android.content.ContentValues import android.content.Context +import android.content.DialogInterface import android.os.Bundle -import android.text.format.DateFormat.is24HourFormat import android.view.View import android.view.ViewGroup +import android.view.WindowManager import android.view.inputmethod.InputMethodManager import android.widget.EditText import android.widget.Toast +import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import kotlinx.android.synthetic.main.activity_addcontact.* import java.text.DateFormat @@ -58,26 +59,36 @@ class NewContactActivity : AppCompatActivity() { } date_input.setOnClickListener { - DatePickerDialog(this@NewContactActivity, dateSetListener, + DatePickerDialog( + this@NewContactActivity, dateSetListener, cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), - cal.get(Calendar.DAY_OF_MONTH)).show() - } - - val timeSetListener = TimePickerDialog.OnTimeSetListener { _, hour, minute -> - cal.set(Calendar.HOUR_OF_DAY, hour) - cal.set(Calendar.MINUTE, minute) - - time_input.setText(DateFormat.getTimeInstance(DateFormat.SHORT).format(cal.time)) + cal.get(Calendar.DAY_OF_MONTH) + ).show() } - val is24Hour = is24HourFormat(applicationContext) time_input.setOnClickListener { - TimePickerDialog(this@NewContactActivity, timeSetListener, - cal.get(Calendar.HOUR_OF_DAY), - cal.get(Calendar.MINUTE), - is24Hour - ).show() + val builder = AlertDialog.Builder(this) + val dialogView = layoutInflater.inflate(R.layout.duration_dialog, null) + val durationText = dialogView.findViewById(R.id.duration) + builder.setView(dialogView) + builder.setTitle(getString(R.string.contact_duration_title)) + durationText.hint = getString(R.string.duration_instructions) + builder.setPositiveButton("OK", DialogInterface.OnClickListener { _, _ -> + val durationText = durationStringToText(durationText.text.toString()) + if (durationText.isEmpty()) { + Toast.makeText(this, + R.string.incorrect_alarm_time, + Toast.LENGTH_LONG).show() + } else { time_input.setText(durationText) } + }) + builder.setNegativeButton("cancel", DialogInterface.OnClickListener { dialog, _ -> + dialog.dismiss() + }) + val dialog = builder.create() + dialog.window?.setSoftInputMode( + WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); + dialog.show() } // Database operation @@ -131,6 +142,15 @@ class NewContactActivity : AppCompatActivity() { place_input.error = getString(R.string.compulsory_field) errorCount++ } + val durationText = time_input.text.toString() + var contactDuration = 0 + if (durationText.isEmpty()) { + time_input.error = getString(R.string.compulsory_field) + errorCount++ + } else { + val durationParts = durationText.split('h') + contactDuration = durationParts[0].toInt() * 60 + durationParts[1].dropLast(1).toInt() + } // Handle time field cal.set(Calendar.HOUR_OF_DAY, 0) @@ -145,6 +165,7 @@ class NewContactActivity : AppCompatActivity() { put(feedEntry.NAME_COLUMN, contactName) put(feedEntry.PLACE_COLUMN, contactPlace) put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) + put(feedEntry.DURATION_COLUMN, contactDuration) put(feedEntry.PHONE_COLUMN, phone_input.text.toString()) put(feedEntry.RELATIVE_COLUMN, relativeChoice) put(feedEntry.CLOSECONTACT_COLUMN, contactCloseContactChoice) @@ -190,4 +211,20 @@ class NewContactActivity : AppCompatActivity() { getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager inputMethodManager.hideSoftInputFromWindow(currentFocus?.windowToken, 0) } + + private fun durationStringToText(durationString: String): String { + var durationText = "" + val durationSplit = durationString.split(":") + if (durationSplit.size == 2) { + if (durationSplit[1].toInt() < 60) { + durationText = durationSplit[0].toInt().toString() + "h" + + durationSplit[1].toInt().toString() + "m" + } + } else if (durationSplit.size == 1) { + val hours = durationString.toInt() / 60 + val minutes = durationString.toInt() % 60 + durationText = hours.toString() + "h" + minutes.toString() + "m" + } + return durationText + } } diff --git a/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt b/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt index 9cb6639..06e7e9f 100644 --- a/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt +++ b/android_app/app/src/main/java/com/apozas/contactdiary/NewEventActivity.kt @@ -16,16 +16,17 @@ package com.apozas.contactdiary */ import android.app.DatePickerDialog -import android.app.TimePickerDialog import android.content.ContentValues import android.content.Context +import android.content.DialogInterface import android.os.Bundle -import android.text.format.DateFormat.is24HourFormat import android.view.View import android.view.ViewGroup +import android.view.WindowManager import android.view.inputmethod.InputMethodManager import android.widget.EditText import android.widget.Toast +import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import kotlinx.android.synthetic.main.activity_addevent.* import java.text.DateFormat @@ -65,22 +66,28 @@ class NewEventActivity : AppCompatActivity() { ).show() } - val eventtimeSetListener = TimePickerDialog.OnTimeSetListener { _, hour, minute -> - cal.set(Calendar.HOUR_OF_DAY, hour) - cal.set(Calendar.MINUTE, minute) - - eventtime_input.setText(DateFormat.getTimeInstance(DateFormat.SHORT).format(cal.time)) - - } - - val is24Hour = is24HourFormat(applicationContext) eventtime_input.setOnClickListener { - TimePickerDialog( - this@NewEventActivity, eventtimeSetListener, - cal.get(Calendar.HOUR_OF_DAY), - cal.get(Calendar.MINUTE), - is24Hour - ).show() + val builder = AlertDialog.Builder(this) + val dialogView = layoutInflater.inflate(R.layout.duration_dialog, null) + val durationText = dialogView.findViewById(R.id.duration) + builder.setView(dialogView) + builder.setTitle(getString(R.string.event_duration_title)) + durationText.hint = getString(R.string.duration_instructions) + builder.setPositiveButton("OK", DialogInterface.OnClickListener { _, _ -> + val durationText = durationStringToText(durationText.text.toString()) + if (durationText.isEmpty()) { + Toast.makeText(this, + R.string.incorrect_alarm_time, + Toast.LENGTH_LONG).show() + } else { eventtime_input.setText(durationText) } + }) + builder.setNegativeButton("cancel", DialogInterface.OnClickListener { dialog, _ -> + dialog.dismiss() + }) + val dialog = builder.create() + dialog.window?.setSoftInputMode( + WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); + dialog.show() } // Database operation @@ -124,6 +131,15 @@ class NewEventActivity : AppCompatActivity() { eventplace_input.error = getString(R.string.compulsory_field) errorCount++ } + val durationText = eventtime_input.text.toString() + var contactDuration = 0 + if (durationText.isEmpty()) { + eventtime_input.error = getString(R.string.compulsory_field) + errorCount++ + } else { + val durationParts = durationText.split('h') + contactDuration = durationParts[0].toInt() * 60 + durationParts[1].dropLast(1).toInt() + } // Handle time field cal.set(Calendar.HOUR_OF_DAY, 0) @@ -138,6 +154,7 @@ class NewEventActivity : AppCompatActivity() { put(feedEntry.NAME_COLUMN, eventName) put(feedEntry.PLACE_COLUMN, eventPlace) put(feedEntry.TIMESTAMP_COLUMN, cal.timeInMillis) + put(feedEntry.DURATION_COLUMN, contactDuration) put(feedEntry.PHONE_COLUMN, eventphone_input.text.toString()) put(feedEntry.COMPANIONS_COLUMN, eventpeople_input.text.toString()) put(feedEntry.ENCOUNTER_COLUMN, eventIndoorOutdoorChoice) @@ -183,4 +200,20 @@ class NewEventActivity : AppCompatActivity() { getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager inputMethodManager.hideSoftInputFromWindow(currentFocus?.windowToken, 0) } + + private fun durationStringToText(durationString: String): String { + var durationText = "" + val durationSplit = durationString.split(":") + if (durationSplit.size == 2) { + if (durationSplit[1].toInt() < 60) { + durationText = durationSplit[0].toInt().toString() + "h" + + durationSplit[1].toInt().toString() + "m" + } + } else if (durationSplit.size == 1) { + val hours = durationString.toInt() / 60 + val minutes = durationString.toInt() % 60 + durationText = hours.toString() + "h" + minutes.toString() + "m" + } + return durationText + } } \ No newline at end of file diff --git a/android_app/app/src/main/res/layout/activity_addcontact.xml b/android_app/app/src/main/res/layout/activity_addcontact.xml index 72fb1dc..ee67e68 100644 --- a/android_app/app/src/main/res/layout/activity_addcontact.xml +++ b/android_app/app/src/main/res/layout/activity_addcontact.xml @@ -99,7 +99,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:text="@string/time_optional" + android:text="@string/duration" android:focusable="false" /> + + + + \ No newline at end of file diff --git a/android_app/app/src/main/res/values-ca/strings.xml b/android_app/app/src/main/res/values-ca/strings.xml index 6087e2c..c0506a5 100644 --- a/android_app/app/src/main/res/values-ca/strings.xml +++ b/android_app/app/src/main/res/values-ca/strings.xml @@ -25,7 +25,7 @@ Esdeveniment guardat Editar esdeveniment Editar contacte - Hora (opcional) + Durada Opcions Entrada eliminada Digues-me què en penses de l\'app, o problemes que has trobat @@ -80,4 +80,7 @@ Traducció a l\'indonesi - hexatester Traducció al polonès - wasikr7 Traducció al suec - nlssn + Duració del contacte + Duració de l\'esdeveniment + Inseriu minuts o hh:mm diff --git a/android_app/app/src/main/res/values-de/strings.xml b/android_app/app/src/main/res/values-de/strings.xml index 0f57d78..a2ec42c 100644 --- a/android_app/app/src/main/res/values-de/strings.xml +++ b/android_app/app/src/main/res/values-de/strings.xml @@ -25,7 +25,7 @@ Gruppenbegegnung gespeichert Gruppenbegegnung bearbeiten Begegnung bearbeiten - Uhrzeit (optional) + Dauer Optionen Eintrag gelöscht Erzähl mir, was du von der App hältst oder melde Probleme, die dir auffallen @@ -80,4 +80,7 @@ Indonesische Übersetzung - hexatester Polnische Übersetzung - wasikr7 Schwedische Übersetzung - nlssn + Gruppenbegegnungdauer + Begegnungdauer + Minuten einfügen oder ss:mm diff --git a/android_app/app/src/main/res/values-es/strings.xml b/android_app/app/src/main/res/values-es/strings.xml index a56a6bb..31289da 100644 --- a/android_app/app/src/main/res/values-es/strings.xml +++ b/android_app/app/src/main/res/values-es/strings.xml @@ -22,7 +22,7 @@ El diario está vacío Contacto guardado Evento guardado - Hora (opcional) + Duración Editar evento Editar contacto Entrada eliminada @@ -79,4 +79,7 @@ Traducción al indonesio - hexatester Traducción al polaco - wasikr7 Traducción al sueco - nlssn + Duración del contacto + Duración del evento + Introduce minutos o hh:mm \ No newline at end of file diff --git a/android_app/app/src/main/res/values-fi/strings.xml b/android_app/app/src/main/res/values-fi/strings.xml index d53c706..694e022 100644 --- a/android_app/app/src/main/res/values-fi/strings.xml +++ b/android_app/app/src/main/res/values-fi/strings.xml @@ -25,7 +25,7 @@ Tapahtuma tallennettu Muokkaa tapahtumaa Muokkaa yhteystietoa - Aika (vapaaehtoinen) + Kesto Vaihtoehdot Merkintä poistettu Kerro minulle mitä mieltä olet sovelluksesta tai ongelmista, joita olet kohdannut @@ -70,4 +70,7 @@ Huomautukset (vapaaehtoinen) Kiitos Noin + Tapahtuman kesto + Yhteystieto kesto + Lisää minuutit tai tt:mm diff --git a/android_app/app/src/main/res/values-fr/strings.xml b/android_app/app/src/main/res/values-fr/strings.xml index 50b4c8f..cf98d39 100644 --- a/android_app/app/src/main/res/values-fr/strings.xml +++ b/android_app/app/src/main/res/values-fr/strings.xml @@ -25,7 +25,7 @@ Événement enregistré Modifier l\'événement Modifier le contact - Heure (optionnel) + Durée Options Entrée supprimée Dîtes-moi ce que vous pensez de l\'application, ou les problèmes que vous avez rencontrés @@ -70,4 +70,7 @@ Notes (optionnel) Merci À propos + Durée du contact + Durée de l\'événement + Insérez minutes ou hh:mm diff --git a/android_app/app/src/main/res/values-id/strings.xml b/android_app/app/src/main/res/values-id/strings.xml index d3a6b7b..8872570 100644 --- a/android_app/app/src/main/res/values-id/strings.xml +++ b/android_app/app/src/main/res/values-id/strings.xml @@ -25,7 +25,7 @@ Acara disimpan Edit acara Edit kontak - Waktu (opsional) + Durasi Pilihan Entri dihapus Beri tahu saya pendapat Anda tentang aplikasi, atau masalah yang Anda temui @@ -80,4 +80,7 @@ Terjemahan bahasa Indonesia - hexatester Terjemahan bahasa Polandia - wasikr7 Terjemahan bahasa Swedia - nlssn + Durasi acara + Durasi kontak + Masukkan menit atau jj:mm diff --git a/android_app/app/src/main/res/values-it/strings.xml b/android_app/app/src/main/res/values-it/strings.xml index 50fd000..12fd787 100644 --- a/android_app/app/src/main/res/values-it/strings.xml +++ b/android_app/app/src/main/res/values-it/strings.xml @@ -22,7 +22,7 @@ Luogo Data Ora - Ora (facoltativa) + Durata Compagni (facoltativi) Telefono (facoltativo) Tipo di incontro @@ -69,4 +69,7 @@ Voci duplicate Grazie Di + Durata dell\'evento + Durata del contatto + Inserisci minuti o oo:mm diff --git a/android_app/app/src/main/res/values-nl/strings.xml b/android_app/app/src/main/res/values-nl/strings.xml index e83032a..243eb49 100644 --- a/android_app/app/src/main/res/values-nl/strings.xml +++ b/android_app/app/src/main/res/values-nl/strings.xml @@ -25,7 +25,7 @@ Gebeurtenis opgeslagen Bewerk gebeurtenis Contact bewerken - Tijd (optioneel) + Duur Opties Vermelding verwijderd Vertel me wat je vindt van de app, of wat voor problemen ben je tegen gekomen @@ -70,4 +70,7 @@ Notities (optioneel) Bedankt Over + Contact duur + Gebeurtenis duur + Invoegen minuten of uu:mm diff --git a/android_app/app/src/main/res/values-pl/strings.xml b/android_app/app/src/main/res/values-pl/strings.xml index 5908558..90474d4 100644 --- a/android_app/app/src/main/res/values-pl/strings.xml +++ b/android_app/app/src/main/res/values-pl/strings.xml @@ -25,7 +25,7 @@ Wydarzenie zapisane Edytuj wydarzenie Edytuj spotkanie - Godzina (opcjonalnie) + Trwanie Opcje Wpis usunięty Daj znać, co sądzisz o programie albo poinformuj o napotkanych błędach @@ -70,4 +70,7 @@ Notatki (opcjonalnie) Dzięki O + Czas trwania kontaktu + Czas trwania wydarzenia + Wstaw minuty lub gg:mm diff --git a/android_app/app/src/main/res/values-sv/strings.xml b/android_app/app/src/main/res/values-sv/strings.xml index b845b7c..0983630 100644 --- a/android_app/app/src/main/res/values-sv/strings.xml +++ b/android_app/app/src/main/res/values-sv/strings.xml @@ -25,7 +25,7 @@ Händelsen sparad Redigera händelse Redigera kontakt - Tid (valfritt) + Varaktighet Inställningar Inlägg raderat Berätta vad du tycker om appen eller de problem du har stött på @@ -70,4 +70,7 @@ Anteckningar (valfritt) Tack Handla om + Händelsens varaktighet + Händelsens kontakt + Infoga minuter eller tt:mm diff --git a/android_app/app/src/main/res/values/strings.xml b/android_app/app/src/main/res/values/strings.xml index 32bf0ca..6a27876 100644 --- a/android_app/app/src/main/res/values/strings.xml +++ b/android_app/app/src/main/res/values/strings.xml @@ -25,7 +25,7 @@ Event saved Edit event Edit contact - Time (optional) + Duration Options Entry deleted Tell me what you think about the app, or problems you have encountered @@ -47,7 +47,7 @@ Show close contacts only More Settings - 00:00 + 0h0m Entries deleted " entries selected" Privacy policy @@ -85,4 +85,7 @@ Indonesian translation - hexatester Polish translation - wasikr7 Swedish translation - nlssn + Insert minutes or hh:mm + Contact duration + Event duration \ No newline at end of file From 3069e567eb48bf86c29cb614d56779c9a8bcf758 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 15 Nov 2020 18:27:18 +0100 Subject: [PATCH 16/71] Add missing layout changes for Duration --- android_app/app/src/main/res/layout/activity_addevent.xml | 2 +- .../app/src/main/res/layout/activity_editcontact.xml | 6 +++--- android_app/app/src/main/res/layout/activity_editevent.xml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android_app/app/src/main/res/layout/activity_addevent.xml b/android_app/app/src/main/res/layout/activity_addevent.xml index 2b1eddb..e8478aa 100644 --- a/android_app/app/src/main/res/layout/activity_addevent.xml +++ b/android_app/app/src/main/res/layout/activity_addevent.xml @@ -98,7 +98,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:text="@string/time_optional"/> + android:text="@string/duration"/> + tools:ignore="VectorDrawableCompat" /> \ No newline at end of file diff --git a/android_app/app/src/main/res/layout/activity_editevent.xml b/android_app/app/src/main/res/layout/activity_editevent.xml index 7704124..96e253d 100644 --- a/android_app/app/src/main/res/layout/activity_editevent.xml +++ b/android_app/app/src/main/res/layout/activity_editevent.xml @@ -125,7 +125,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:text="@string/time_optional"/> + android:text="@string/duration" /> + tools:ignore="VectorDrawableCompat" /> \ No newline at end of file From 571e14830f920c628f06562e012f134907a11687 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 15 Nov 2020 18:37:05 +0100 Subject: [PATCH 17/71] Remove Rate preference --- android_app/app/src/main/res/xml/preferences.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/android_app/app/src/main/res/xml/preferences.xml b/android_app/app/src/main/res/xml/preferences.xml index 7652129..673ca38 100644 --- a/android_app/app/src/main/res/xml/preferences.xml +++ b/android_app/app/src/main/res/xml/preferences.xml @@ -43,16 +43,6 @@ android:data="@string/donate_url"/> - - - - Date: Sun, 15 Nov 2020 19:24:12 +0100 Subject: [PATCH 18/71] Update dependencies --- android_app/app/build.gradle | 11 +++++------ android_app/build.gradle | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/android_app/app/build.gradle b/android_app/app/build.gradle index 58b5a15..a91065f 100644 --- a/android_app/app/build.gradle +++ b/android_app/app/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 30 - buildToolsVersion "30.0.1" + buildToolsVersion "30.0.2" defaultConfig { applicationId "com.apozas.contactdiary" @@ -46,13 +46,12 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.3.1' + implementation 'androidx.core:core-ktx:1.3.2' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.constraintlayout:constraintlayout:2.0.1' - implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0' - implementation 'androidx.navigation:navigation-ui-ktx:2.3.0' - implementation 'androidx.preference:preference:1.1.1' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'androidx.navigation:navigation-fragment-ktx:2.3.1' + implementation 'androidx.navigation:navigation-ui-ktx:2.3.1' implementation 'androidx.preference:preference-ktx:1.1.1' testImplementation 'junit:junit:4.13' androidTestImplementation 'androidx.test.ext:junit:1.1.2' diff --git a/android_app/build.gradle b/android_app/build.gradle index 4554851..410823d 100644 --- a/android_app/build.gradle +++ b/android_app/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.0.1' + classpath 'com.android.tools.build:gradle:4.1.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong From d93c50ecbbf044674baa1537230d210e2829b5c8 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 15 Nov 2020 19:29:55 +0100 Subject: [PATCH 19/71] Update french translation --- android_app/app/src/main/res/values-fr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android_app/app/src/main/res/values-fr/strings.xml b/android_app/app/src/main/res/values-fr/strings.xml index cf98d39..183dc91 100644 --- a/android_app/app/src/main/res/values-fr/strings.xml +++ b/android_app/app/src/main/res/values-fr/strings.xml @@ -4,7 +4,7 @@ Paramètres Nouveau contact Nouvel événement - Nom de l\'évènement + Nom de l\'événement Non Oui Date From 3aa7288471d8cfee8e0d6570f8aca0a9753a662b Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Sun, 15 Nov 2020 19:31:15 +0100 Subject: [PATCH 20/71] Version bump --- android_app/app/build.gradle | 4 ++-- fastlane/metadata/android/de/changelogs/11.txt | 11 +++++++++++ fastlane/metadata/android/en-US/changelogs/11.txt | 11 +++++++++++ fastlane/metadata/android/es-ES/changelogs/11.txt | 11 +++++++++++ fastlane/metadata/android/it/changelogs/11.txt | 11 +++++++++++ 5 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/de/changelogs/11.txt create mode 100644 fastlane/metadata/android/en-US/changelogs/11.txt create mode 100644 fastlane/metadata/android/es-ES/changelogs/11.txt create mode 100644 fastlane/metadata/android/it/changelogs/11.txt diff --git a/android_app/app/build.gradle b/android_app/app/build.gradle index a91065f..226611c 100644 --- a/android_app/app/build.gradle +++ b/android_app/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId "com.apozas.contactdiary" minSdkVersion 14 targetSdkVersion 30 - versionCode 10 - versionName "1.1.4" + versionCode 11 + versionName "1.2.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/fastlane/metadata/android/de/changelogs/11.txt b/fastlane/metadata/android/de/changelogs/11.txt new file mode 100644 index 0000000..ac59650 --- /dev/null +++ b/fastlane/metadata/android/de/changelogs/11.txt @@ -0,0 +1,11 @@ +Diese Version bietet einige neue Funktionen, darunter zwei wichtige. + +- Der Uhrzeit des Kontakts wird nicht mehr abgefragt, da er weitgehend irrelevant ist. Stattdessen fragen die Formulare jetzt nach der Dauer des Kontakts. +- App-Verknüpfungen (dank GenosseFlosse). Wenn Sie lange auf das App-Symbol drücken, wird ein Menü mit Verknüpfungen zum Hinzufügen von Kontakten angezeigt, ohne die App aufzurufen. Sie können Symbole mit dem Menü Auch diese Verknüpfungen erstellen. + +- Kredit sollte dort gegeben werden, wo er es verdient. Die App hat einen neuen Dankesbereich. +- Einige Fehler wurden behoben, einschließlich der Visualisierung nur riskanter Kontakte. +- Neue Übersetzungen sind: Polnisch (dank wasikr7), Finnisch (dank Mikko95) und Indonesisch (dank hexatester). +- Kleine Korrekturen in den anderen Übersetzungen. + +Wenn Sie bei der Übersetzung in Ihre Sprache helfen möchten, besuchen Sie bitte das Tagebuch. Besuchen Sie http://www.crowdin.com/project/contactdiary diff --git a/fastlane/metadata/android/en-US/changelogs/11.txt b/fastlane/metadata/android/en-US/changelogs/11.txt new file mode 100644 index 0000000..73cfe9d --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/11.txt @@ -0,0 +1,11 @@ +This version brings quite a few new features, with two important ones. + +- The time of the contact is no longer asked, because it is largely irrelevant. Instead, now the forms ask for the duration of the contact. +- App shortcuts (thanks to GenosseFlosse). Long-pressing the app's icon will show a menu with shortcuts for adding contacts without entering the app. You can also create menu icons with these shortcuts. + +- Since credit must be given where credit is due, a section with acknowledgments has been added. +- Some bugs have been squashed, including the visualization of risky contacts only. +- New translations are available: Polish (thanks to wasikr7), Finnish (thanks to Mikko95) and Indonesian (thanks to hexatester). +- Small fixes in the other translations. + +If you want to help translating Contact Diary to your language, please visit http://www.crowdin.com/project/contactdiary diff --git a/fastlane/metadata/android/es-ES/changelogs/11.txt b/fastlane/metadata/android/es-ES/changelogs/11.txt new file mode 100644 index 0000000..4593ff1 --- /dev/null +++ b/fastlane/metadata/android/es-ES/changelogs/11.txt @@ -0,0 +1,11 @@ +Esta versión trae unas cuantas características nuevas, dos de las cuales son importantes. + +- Ya no se pide la hora del contacto, porque era irrelevante. En su lugar, ahora los formularios solicitarán la duración del contacto. +- Accesos directos (gracias a GenosseFlosse). Al hacer una pulsación larga en el icono de la app, se mostrará un menú con accesos directos a añadir contactos y eventos, sin entrar a la app. También se pueden crear iconos en el menú con estos atajos. + +- Dado que es de buen nacido ser agradecido, se ha añadido una sección de agradecimientos en la app. +- Se han arreglado unos cuantos errores, incluyendo la visualización de solo contactos de riesgo. +- Se han añadido nuevas traducciones: Polaco (gracias a wasikr7), Finlandés (gracias a Mikko95) e Indonesio (gracias a hexatester). +- Se han arreglado pequeños detalles en el resto de traducciones. + +Si quieres ayudar traduciendo Diario de Contactos a tu idioma, por favor visita http://www.crowdin.com/project/contactdiary diff --git a/fastlane/metadata/android/it/changelogs/11.txt b/fastlane/metadata/android/it/changelogs/11.txt new file mode 100644 index 0000000..93fbf34 --- /dev/null +++ b/fastlane/metadata/android/it/changelogs/11.txt @@ -0,0 +1,11 @@ +Questa versione porta diverse nuove funzionalità, due dei quali sono importanti. + +- Non c'è tempo di contatto più si chiede, perché era irrilevante. Invece, le forme ora chiedono la durata del contatto. +- Tasti di scelta rapida (grazie a GenosseFlosse). Nel fare una pressione prolungata sull'icona dell'app, verrà visualizzato un menu con le scorciatoie per aggiungere contatti e gli eventi, senza entrare l'applicazione. È inoltre possibile creare icone sul menu con queste scorciatoie. + +- Dal momento che è bene essere grati nato, è stata aggiunta la sezione riconoscimenti in app. +- Corretto alcuni bug, tra cui l'esposizione di rischio di contatto unico. +- Abbiamo aggiunto nuove traduzioni: Polish (grazie a wasikr7), finlandesi (grazie a Mikko95) e indonesiani (grazie a hexatester). +- Corretto piccoli dettagli in altre traduzioni. + +Se si vuole aiutare a tradurre ufficiale contatti con la lingua, si prega di visitare http://www.crowdin.com/project/contactdiary From ca40175f4e031db0c7f99e777f49c412e4104466 Mon Sep 17 00:00:00 2001 From: Alex Pozas-Kerstjens Date: Mon, 16 Nov 2020 13:51:44 +0100 Subject: [PATCH 21/71] Create FUNDING.yml --- .github/FUNDING.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..ef68cc5 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: ['https://paypal.me/apozasker'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From 874d5ac4842c46da7669195985c84f0b242f1176 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Tue, 17 Nov 2020 14:00:36 +0100 Subject: [PATCH 22/71] More updating dependencies This should fix #19 --- android_app/gradle/wrapper/gradle-wrapper.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android_app/gradle/wrapper/gradle-wrapper.properties b/android_app/gradle/wrapper/gradle-wrapper.properties index ae2331e..68c5b09 100644 --- a/android_app/gradle/wrapper/gradle-wrapper.properties +++ b/android_app/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Aug 03 21:15:14 CEST 2020 +#Tue Oct 13 21:01:26 CEST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip From eda4e0349ab08703d80201071ab96c492a7bcf99 Mon Sep 17 00:00:00 2001 From: Alex Pozas Date: Wed, 18 Nov 2020 23:39:52 +0100 Subject: [PATCH 23/71] Move colors to resources --- android_app/app/src/main/res/drawable/rounded_corner.xml | 2 +- android_app/app/src/main/res/layout/list_layout.xml | 6 +++--- android_app/app/src/main/res/values/colors.xml | 4 ++++ android_app/app/src/main/res/values/styles.xml | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/android_app/app/src/main/res/drawable/rounded_corner.xml b/android_app/app/src/main/res/drawable/rounded_corner.xml index 279b061..388186a 100644 --- a/android_app/app/src/main/res/drawable/rounded_corner.xml +++ b/android_app/app/src/main/res/drawable/rounded_corner.xml @@ -1,7 +1,7 @@ - + @@ -20,8 +20,8 @@ android:id="@+id/list_item_header" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:textColor="#FFFFFF" - android:background="@color/colorPrimary" + android:textColor="@color/colorDate" + android:background="@color/colorDateBackground" android:visibility="gone" android:contextClickable="false" android:padding="6dp" diff --git a/android_app/app/src/main/res/values/colors.xml b/android_app/app/src/main/res/values/colors.xml index 7433017..5f9c35f 100644 --- a/android_app/app/src/main/res/values/colors.xml +++ b/android_app/app/src/main/res/values/colors.xml @@ -4,4 +4,8 @@ #006C63 #03DAC5 #DADADA + #FAFAFA + #006C63 + #009688 + #FFFFFF \ No newline at end of file diff --git a/android_app/app/src/main/res/values/styles.xml b/android_app/app/src/main/res/values/styles.xml index 3f96e47..235d840 100644 --- a/android_app/app/src/main/res/values/styles.xml +++ b/android_app/app/src/main/res/values/styles.xml @@ -7,6 +7,7 @@ @color/colorAccent true @color/colorPrimary + @color/colorBackground