-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Pkpass parser #2038
Add Pkpass parser #2038
Conversation
7124d28
to
657807c
Compare
562d9d1
to
72fb68f
Compare
1a9755e
to
2150e2a
Compare
2150e2a
to
6eaf23e
Compare
a78acad
to
9362482
Compare
4eb7e68
to
936bbb8
Compare
ffc82bd
to
9130554
Compare
I'm not sure if I want to spend too much time trying to fix "Rotating the edit activity without changes causes Catima to think you made a change", it's a very minor thing in the grand scheme of things. Maybe we should just get ready to put this live, it's been taking way too long already... |
c4f640c
to
bf95447
Compare
So, I've spend way too much time on this. This whole feature has been... challenging. Every little fix broke something else and I ended up having to change a huge amount of Catima to make this work (and future-proof) but I think we might be here. All of this to fix the lightbulb in the kitchen. I would be great if people could do some testing to see if I missed anything. And not just of the pkpass part, just of... the whole app, because so many core things about card handling got changed. If nobody reports any issues soon, I'll probably just merge this and give the translators some time to translate and then release :) (Note: this is a debug build with a different package name, it will be installed as a second "Catima Debug" app, it won't override your main app) |
Oops, I forgot to handle the pkpass parser being unable to parse the file... |
throw IOException(context.getString(R.string.errorReadingFile)) | ||
} | ||
|
||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider extracting this try-and-catch logic as a separate function to improve readability.
6bf956a
to
5efa933
Compare
New debug build:
|
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).
This should make it possible to properly cancel the running barcode generation threads on rotation and prevent CPU rising on many rotations.
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
The LoyaltyCard object itself loads the images itself
5efa933
to
8009bac
Compare
Okay, I've had multiple people tell me it works great now and all my testing seems to succeed to. I guess it's time to hit the merge button :) Thank you for testing, everyone! There's still some follow-up features that would be neat (like updating the pkpass card) but this PR has already taken much longer than I wanted so let's just call this done for now, give the translators a moment to translate, and do a new release. If anyone still finds anything in the latest beta release after this message, still please do tell me :) |
!!! Blocked by #2051 !!!
New regression to fix: