Commit Graph

804 Commits

Author SHA1 Message Date
Christos Tsingiropoylos
9a1d7d2e44 Sort by valid from date (#2297) 2025-01-15 22:01:25 +01:00
Sylvia van Os
d6bbd16945 Add unofficial support for espass
While espass files aren't pkpass files, they are so similar we can
generally parse them fine with the pkpass parser. While this feature
shouldn't be advertised as it is kinda hacky, it does make it easier for
PassAndroid users to share cards with Catima users.
2025-01-11 12:38:03 +01:00
Sylvia van Os
5c5a1df39d Also parse application/vnd-com.apple.pkpass as pkpass files 2025-01-11 12:19:48 +01:00
Sylvia van Os
eebbe6dec8 Improve star and archive display
By improving the icons to all have a small border, they will be visible
on every background and we can severely simplify the code
2024-12-25 21:06:15 +01:00
Sylvia van Os
91551bf4e8 Start using flavours
Currently, this just allows us to remove the donation button on Google
Play without using the deprecated installer APIs.

In the future, this should allow us to also release multiple versions of
Catima (for example: WearOS is a commonly requested feature, but this
needs non-free dependencies, which may not be okay to all users).
2024-12-24 14:33:35 +01:00
Sylvia van Os
75c393af92 Fix crash when trying to load invalid pkpass file 2024-12-12 17:13:49 +01:00
Sylvia van Os
8009baca26 Remove unnecessary image load from storage calls
The LoyaltyCard object itself loads the images itself
2024-12-07 15:23:07 +01:00
Sylvia van Os
e0786594bc Load images on request
This prevents loading the front and back images when scrolling through
the loyalty card list and should allow scaling to more images/files more
easily
2024-12-07 15:23:07 +01:00
Sylvia van Os
7fe67960bf Move TaskHandler to ViewModel
This should make it possible to properly cancel the running barcode
generation threads on rotation and prevent CPU rising on many rotations.
2024-12-07 15:23:07 +01:00
Sylvia van Os
83fca93649 Use ViewModel to prevent hammering storage
When you turn a LoyaltyCard into a bundle, it writes the files to
storage as it can't otherwise fit in the limited storage size. This
means that, on rotation, you write all images to storage and load them
again. Using a ViewModel prevents that storage hit due to holding it in
memory (as a ViewModel has a longer lifecycle).
2024-12-07 15:23:07 +01:00
Sylvia van Os
96a9850d9c Delete old cache files on startup 2024-12-07 15:23:07 +01:00
Sylvia van Os
1cb9ddecac Support for returning images from PkpassParser 2024-12-07 15:23:07 +01:00
Sylvia van Os
f7697ce8bf Support opening supported barcode files directly 2024-12-07 15:23:07 +01:00
Sylvia van Os
9358348795 Add option to share pkpass file to Catima 2024-12-07 15:23:07 +01:00
Sylvia van Os
711ca1e761 Add option to load pkpass from ScanActivity 2024-12-07 15:23:07 +01:00
Sylvia van Os
8eeff0058b Refactor ScanActivity result code (use ParseResult) 2024-12-07 15:23:07 +01:00
Sylvia van Os
ea456c6d80 Add Pkpass parser 2024-12-07 15:23:05 +01:00
Sylvia van Os
4dd85f845e Fix background colour for shortcuts 2024-12-05 18:52:27 +01:00
Sylvia van Os
e6345bc2fe Make thumbnails in edit view consistent with card view
Commit 88c1dd1bc6 changed the behaviour of
the background colour of the thumbnails, but the edit view still used
the old behaviour. This creates more consistency.
2024-12-03 00:33:21 +01:00
Sylvia van Os
88c1dd1bc6 Use black/white background colour instead of dominant colour for images
This severely reduces the risk of a transparent PNG being put on a
background which is the same colour as the logo
2024-11-29 17:37:03 +01:00
Sylvia van Os
389372e8f3 Fix parsing PDF with transparent background 2024-11-18 22:03:41 +01:00
Sylvia van Os
9c5603eae6 Use MEDIUM instead of FULL date format on main screen
This improves the display of high column counts
2024-11-11 17:50:14 +01:00
vp193dt
6f4582eec9 Refactoring of Search Behavior: Restoring of Previous Search Query After Coming Back from Card Interaction or Screen Rotation on Search 2024-11-06 19:12:01 +01:00
Sylvia van Os
d7b8cd7e03 More consistant naming and column edge case bugfix for shortcut picker 2024-11-02 13:45:25 +01:00
Sylvia van Os
dc65030a63 Padding fixes to ensure the cards scale well without changing text size in LoyaltyCardViewActivity 2024-11-01 22:35:33 +01:00
Sylvia van Os
328c110a97 General cleanups 2024-11-01 22:32:05 +01:00
Marnes
6f456437f7 implement #1952: custom column count 2024-11-01 18:27:41 +01:00
Marnes
1b0fd94a8c misc. linting 2024-11-01 18:27:33 +01:00
Sylvia van Os
6cbfb6dd48 Don't show import cancelled text on import completion 2024-10-27 22:51:45 +01:00
FC (Fay) Stegerman
98f4e0dd7f StocardImporter: use ZipFile (fixes spanned archive marker breaking import) 2024-10-22 21:36:29 +02:00
Vincent Caron
d95a7f7982 Add icons to the "More options" dialog (#2121) 2024-10-21 18:39:30 +02:00
Sylvia van Os
33a3c7645e Change card with volume buttons at most once per second 2024-10-08 23:15:26 +02:00
Filip Rzuhovský
09dc0e4c15 Implemented card swiping with volume buttons mechanism 2024-10-08 19:48:17 +02:00
Sylvia van Os
727d9ce781 Refactor to allow updating a loyalty card from a bundle (#2051)
This allows us to send any (partial) loyalty card into the edit
activity, granting us greater flexibility in what kind of scan result we
can parse
2024-09-22 10:20:58 +02:00
unbiaseduser-github
80e4701d41 Make Back button/gesture not instantly collapse the MainActivity's search view (#2030) 2024-08-14 20:09:46 +02:00
Sylvia van Os
f3ee88b43c More cleanups 2024-08-12 23:01:27 +02:00
Sylvia van Os
47b076b41d Support setting front or back image as thumbnail 2024-07-13 18:15:05 +02:00
Sylvia van Os
8a8d5c65f2 Fix cancelling import/export by tapping away from dialog 2024-07-07 14:06:31 +02:00
Sylvia van Os
80e05a0392 Hack: Don't turn screen off in import/export activity to avoid background kills 2024-07-07 14:06:02 +02:00
Sylvia van Os
c123dd5d42 Allow store name thumbnails to span multiple lines
Allowing spanning multiple lines helps in case the store name doesn't
fit on a single line. However, the store name should fit a single line
if possible because it looks better when the store name isn't split
among lines. Due to limitations in Android's autoSizeTextType system,
this needs a fairly ugly workaround.
2024-07-01 19:42:35 +02:00
Sylvia van Os
97314a0436 Rename camera permission denied layout to more logical generic error layout name 2024-06-05 20:07:52 +02:00
Sylvia van Os
d1b93018e3 Show generic zxing errors on the camera error screen 2024-06-05 20:07:46 +02:00
Sylvia van Os
a6b7b227f7 Support for devices without camera
This hides the take photo options for thumbnail and front/back image and
shows a different alert if no camera is available
2024-06-04 18:18:29 +02:00
Sylvia van Os
08e6600880 Lower severity of import/export starting log entries to debug
Co-authored-by: FC (Fay) Stegerman <flx@obfusk.net>
2024-05-22 18:08:37 +02:00
Sylvia van Os
edeb95aee0 Run Import/Export on non-UI thread
This seems to fix Android sometimes throwing
NetworkOnMainThreadException when importing bit files through the
Nextcloud app.

I'm not sure if this is necessary for the export too, but it doesn't
seem to break anything so for consistency it makes sense to also wrap
the exporter into a thread.

This change is suboptimal because it will still block the UI with a
ProgressDialog (which is deprecated) and force the user to wait until
the import/export completes (and will kill the import/export if the app
gets backgrounded) but it should at least fix the most common crash for
most users.
2024-05-21 21:04:25 +02:00
Sylvia van Os
d15a46fc6f Fix typo 2024-05-20 20:04:01 +02:00
Sylvia van Os
7a2ff0995f Show image type on view screen when not viewing barcode 2024-05-20 17:47:19 +02:00
Sylvia van Os
b90c43f667 Support for creating a card from shared text 2024-05-20 14:53:10 +02:00
Aglag257
6d97a29e9c Fix describeContents() in LoyaltyCard Class (#1887) 2024-05-20 13:19:13 +02:00
Sylvia van Os
facb23f0a5 Properly fix decimal separator detection logic 2024-05-13 21:17:13 +02:00