We apply window insets to basically not draw behind the top and bottom
bar. While this is a slight visual downgrade (we used to draw behind the
top bar before), it at least allows us to target Android 15.
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.
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).
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).
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.
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.
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.