Skip to content

feat: split complex loyaltyCardViewActivity#3072

Open
NightShiftNexus wants to merge 4 commits intoCatimaLoyalty:mainfrom
NightShiftNexus:feat/2483-split-complex-LoyaltyCardViewActivity
Open

feat: split complex loyaltyCardViewActivity#3072
NightShiftNexus wants to merge 4 commits intoCatimaLoyalty:mainfrom
NightShiftNexus:feat/2483-split-complex-LoyaltyCardViewActivity

Conversation

@NightShiftNexus
Copy link

First part of #2483 - LoyaltyCardViewActivity

This refactor reduces the complexity of LoyaltyCardViewActivity by splitting it along responsibility boundaries rather than into separate normal and fullscreen activities. In the current implementation, fullscreen is still part of the same screen flow: it uses the same card data, the same image navigation, the same actions, and the same lifecycle context.
Creating a second activity for fullscreen would therefore introduce additional state passing and coordination without addressing the real source of complexity.

Instead, the activity was simplified by extracting focused parts of its behavior into smaller, self-contained collaborators. This keeps a single entry point for the screen while making the overall structure easier to understand, maintain, and extend. In my opinion it's better way to reduce current complexity.

@TheLastProject
Copy link
Member

That's a lot of changes, will take me a while to review.

I must say though that I'm not a fan of the amount of removed comments. Many of these comments were added to explain not clearly obvious stuff, like " // Detect square-ish screens like the Unihertz Titan".

Can you please restore the comments?

@NightShiftNexus
Copy link
Author

@TheLastProject Very good point, I have restored the comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants