Commit Graph

889 Commits

Author SHA1 Message Date
Sylvia van Os
d5b3796ae9 Fix crash risk on pkpass encoding 2026-01-15 18:14:55 +01:00
Sylvia van Os
bc21a53d44 Expose barcode encoding in content provider 2026-01-13 21:17:50 +01:00
Sylvia van Os
a5599dc673 Remove automatic barcode encoding type
Migrates all automatic cards to ISO-8859-1 and uses that as default
2026-01-13 19:47:29 +01:00
Matthias Paulmier
ace353d71d Fix several bugs related to shortcut handling (#2919)
* Improve ShortcuHelper.updateShortcuts to take all actions into account

* Remove now useless calls to removeShortcut

* Add doc to explain the usage of maxShortcut

* Fix typo in doc of maxShortcuts
2026-01-09 17:24:29 +01:00
Sylvia van Os
93515d2f88 Set Compose TopAppBar to pure black in OLED theme 2026-01-07 17:17:49 +01:00
Sylvia van Os
b7c42b5c8c Fix list widget opening on previous card sometimes 2026-01-05 20:20:41 +01:00
Sylvia van Os
29c4ccf4d9 Disable automatic barcode encoding guessing for now 2026-01-04 22:57:50 +01:00
Sylvia van Os
d3de9c65e6 Force ISO-8859-1 when importing old backups
This will not catch one edge case: use exporting a backup in Catima
2.41.0 - 2.41.2, then uninstall Catima, then installing Catima 2.41.3
and then importing the database. But this seems rare enough to be
acceptable.
2026-01-04 21:20:49 +01:00
Sylvia van Os
48993f0486 On initial upgrade, force all automatic cards to ISO-8859-1
This fixes old pkpass files imported before Catima 2.41.0 to be forced
to "Automatic", which may guess UTF-8. New pkpass files will have the
encoding read from the file and newly scanned barcodes will use
Automatic.

This does have the unfortunate side effect of everyone who already
scanned a QR code with UTF-8 data since Catima 2.41.0 to have it forced
to ISO-8859-1, but it will fix Deutschlandtickets imported before 2.41.0
which is a rather large amount of the Catima userbase.
2026-01-04 21:20:44 +01:00
Sylvia van Os
80bad7ad56 Never pass ISO-8859-1 as encode hint
This fully restores the old behaviour for pkpass files with ISO-8859-1 as messageEncoding
2026-01-04 20:13:43 +01:00
Sylvia van Os
a10e8d5aab Fix typo in comment 2026-01-03 17:57:06 +01:00
Sylvia van Os
37e6782032 Temporarily re-add Android 5 support (#2925)
* Revert "Bump androidx.activity:activity-compose from 1.10.1 to 1.12.2"

This reverts commit 307f0e12bc.

* Revert "Bump androidx.compose:compose-bom from 2025.11.01 to 2025.12.01"

This reverts commit a0fea79359.

* Revert "Remove Android 5 support"

This reverts commit 23457854b7.

* Update CHANGELOG
2026-01-03 17:54:33 +01:00
Sylvia van Os
2308deba33 Only pass encoding hint in automatic if UTF-8
If zxing is not explicitly told a barcode is UTF-8, it may render it
incorrectly. Which caused
https://github.com/CatimaLoyalty/Android/issues/2555.

However, when an encode hint is set, it will cause zxing to set an ECI
hint inside the barcode, which some scanners may trip over and cause
scanning failures, leading to
https://github.com/CatimaLoyalty/Android/issues/2921.

This change only passes the encoding in automatic mode if zxing
explicitly guesses it to be UTF-8, and otherwise doesn't pass anything,
to keep the ECI empty. This might need to be expanded for other types
like SJIS, but as nobody ever reported such a bug let's assume it's not
necessary for now.
2026-01-03 15:44:51 +01:00
Sylvia van Os
23457854b7 Remove Android 5 support
Newer dependencies need at least Android 6, so no use in keeping this
2026-01-01 19:58:19 +01:00
Sylvia van Os
17d3d86127 Fix Compose status and navigation bar theming
Especially affects Android 14 and below, but also slightly 15 and up
2025-12-31 12:43:11 +01:00
Sylvia van Os
6d2ac18859 Fix Talkback announcing "greater than arrow" 2025-12-29 17:05:55 +01:00
Sylvia van Os
c202c86ce4 Remove theme colour support
This simplifies the codebase and new Compose implementation. If this
feature is really wanted by the community, it could possibly be
reimplemented in a much more flexible way (choosing the exact colour)
after all UIs are migrated to Compose, as Compose can generate a theme
based on just a primary colour.
2025-12-27 13:11:05 +01:00
Sylvia van Os
b06f240755 AboutActivity to Jetpack Compose (#2489)
* WIP

* test: Add test tags for compose components

* test: Add basic test for compose about screen

* refactor: Add defaults for `AboutScreenContent`

* refactor: Move compose tests to unit tests

* refactor: Make `showRateOnGooglePlay` default to `app/build.gradle.kts/defaultConfig` value

* refactor: Best practise to make previews private to reduce pollution

* refactor: Best practise apply theme as high as possible for most cases

* style: Format AboutActivity.kt

* test: Add more comprehensive tests for about screen

* test: Fix configuration of compose tests

* Fix Gradle setup

* Fix build issues

* Adjust text sizing

* Use full black OLED theme in Compose if chosen in settings

---------

Co-authored-by: LooKeR <iamlooker@proton.me>
2025-12-27 13:00:13 +01:00
Sylvia van Os
5a3f7c17ed Apply column count setting in group edit activity 2025-12-26 12:02:19 +01:00
Sylvia van Os
bb8591b0ef Reduce max photo attachment size to 1600x1600px
This reduces the file size with no clear quality change
2025-12-25 16:30:03 +01:00
Sylvia van Os
0c61abf4f0 Add barcode encoding support
- Add new barcodeencoding field to database
- Read barcode encoding from pkpass file
- Add barcodeencoding to import/export
- Add barcodeencoding to share URI
- On default, use zxing's GuessEncoding function in StringUtils (this
  should not use UTF-8 unless needed)
- Allow manually forcing ISO-8859-1 or UTF-8
2025-12-25 16:08:05 +01:00
Charalampos Kardaris
3acf002f95 [Fix] Issue #2812: Show duplicate action in long press menu (#2873)
Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
2025-12-14 22:25:23 +01:00
ProgramminCat
43ccf9b48e Convert MainActivity to Kotlin (#2830)
Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
2025-12-02 20:54:33 +01:00
Sylvia van Os
e03c883a9c Swap currency and balance fields to reduce chance of accidental conversions
This swaps the currency and balance fields to reduce the risk of users
entering a decimal value (1,23) first and having to changed to 1 due to
the default currency (Points) having no decimals.

The changes in the LoyaltyCardEditActivity are purely cosmetic, just a
swap of function order to more closely stick to the order in the XML
layout file
2025-11-29 11:59:31 +01:00
Aditya Varma
5a0d99fc80 Copy card ID to clipboard from menu or long press (#2789)
Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
2025-11-27 19:43:26 +01:00
Sylvia van Os
986ae4f0cb Merge pull request #2783 from u7683648/refactor/convert-letterbitmap-to-kotlin
refactor: Convert LetterBitmap to Kotlin
2025-10-31 17:25:00 +01:00
Xinqi Li
13a78dadb4 convert LetterBitmap to Kotlin 2025-10-31 12:11:58 +11:00
Sylvia van Os
cfefce1baf Minor cleanups 2025-10-29 18:27:15 +01:00
Zechen Ma
ff1683d5b4 refactor: convert ScanActivity.java to Kotlin.
bug: fix indentation and several bugs, convert more code blocks into apply blocks.
2025-10-29 08:35:13 +11:00
Zechen Ma
27c16c2faf Rename .java to .kt 2025-10-24 06:20:23 +11:00
Sylvia van Os
2ab267f601 Merge pull request #2782 from aradxxx/ucropwrapper_to_kt
Convert UcropWrapper to kotlin
2025-10-22 18:47:20 +02:00
Xinqi Li
7f4937552d Rename .java to .kt 2025-10-22 11:22:12 +11:00
Sylvia van Os
b786fd60b4 Merge pull request #2777 from aradxxx/managegroupactivity_codestyle_fixes
ManageGroupActivity.kt small codestyle fixes
2025-10-21 22:44:14 +02:00
aradxxx
66646758a8 Convert UCropWrapper to kotlin 2025-10-21 22:08:15 +04:00
aradxxx
ece309fbde Rename .java to .kt 2025-10-21 21:40:34 +04:00
aradxxx
99c472330f ManageGroupActivity.kt small codestyle fixes 2025-10-20 23:50:51 +04:00
aradxxx
8bed9c753b Convert ManageGroupsActivity.java to Kotlin 2025-10-15 22:58:45 +04:00
aradxxx
47e598ede1 Rename .java to .kt 2025-10-15 21:40:27 +04:00
Sylvia van Os
8094b7cc47 Merge pull request #2760 from aradxxx/manage_group_activity_to_kt
Convert ManageGroupActivity to Kotlin
2025-10-13 23:18:36 +02:00
Sylvia van Os
abd8716b56 Minor cleanups 2025-10-13 23:01:36 +02:00
aradxxx
a0ef9b8d1b Convert ManageGroupActivity.java to Kotlin 2025-10-13 15:04:29 +04:00
aradxxx
802717c7a4 Rename .java to .kt 2025-10-08 21:16:30 +04:00
amlwin
303b40e572 Convert ImportExportActivity to Kotlin
Refactored `ImportExportActivity` and its corresponding test class from Java to Kotlin. The new implementation uses modern Kotlin idioms and syntax while preserving the original functionality.
2025-10-06 11:34:45 +08:00
amlwin
622ea37554 Rename .java to .kt 2025-10-06 11:34:45 +08:00
Aung Myo Lwin
ce3dbaf902 Convert SettingsActivity to Kotlin (#2744)
* Rename .java to .kt

* Convert SettingsActivity to Kotlin

Refactored the `SettingsActivity` and its inner `SettingsFragment` from Java to Kotlin, adopting modern Kotlin idioms and syntax. The functionality remains unchanged.

* Address PR comment: by removing null safety with non-null asserted call operator

* Apply Android Studio suggested fixup

---------

Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
2025-10-05 21:13:17 +02:00
Sylvia van Os
f91b94d100 Dep/bump ucrop (#2748)
* Bump com.github.yalantis:ucrop from 2.2.10 to 2.2.11

Bumps [com.github.yalantis:ucrop](https://github.com/Yalantis/uCrop) from 2.2.10 to 2.2.11.
- [Release notes](https://github.com/Yalantis/uCrop/releases)
- [Commits](https://github.com/Yalantis/uCrop/compare/2.2.10...2.2.11)

---
updated-dependencies:
- dependency-name: com.github.yalantis:ucrop
  dependency-version: 2.2.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build

While testing on Android 15, no difference was found in the status bar
colour on Android 15 with or without the setting

* Use non-native release

* Apply autogenerated ProGuard missing rules

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-04 14:11:42 +02:00
Sylvia van Os
a34a091cdb Fix crash on missing header colors
An off-by-one error caused invalid colour info to sometimes be generated
if no header colour was set. Under normal conditions, a header colour
should always be set, but due to some bugs in the past in some cases
they may not be set.

Sadly this does change the card colours for cards which are not properly
initialized. But that's better than a crash at least.
2025-09-30 23:27:11 +02:00
Sylvia van Os
2f37e2a9c7 Merge pull request #2713 from vijay2909/fix/remove-image-crash
fix: Crash after removing image while viewing image
2025-09-27 12:45:37 +02:00
hritikRitss
9ae02ddb15 fix: reset mainImageIndex if it exceeds available image count 2025-09-26 23:47:37 +05:30
Sylvia van Os
c21159c571 Update used libraries 2025-09-26 19:03:31 +02:00