fix: resolve text clipping and animation lookup issues #1796#1801
Closed
xar43 wants to merge 8 commits into
Closed
fix: resolve text clipping and animation lookup issues #1796#1801xar43 wants to merge 8 commits into
xar43 wants to merge 8 commits into
Conversation
…into development
- Add BadgeLoaderHelper.isLegacyBadge() to detect badges missing original text (created before BadgeTextStorage was introduced) - Show AlertDialog on edit attempt for legacy badges, offering a 'Create New' option instead of opening a broken editor session - Add legacyBadgeTitle, legacyBadgeMessage and createNew keys to app_en.arb for full i18n support Closes fossasia#1769
- importBadgeData: Do not fallback to filename if originalText is missing. Save empty string to correctly flag the badge as legacy. - importBadgeFromJson: Restore embedded custom cliparts and save originalText for badges imported via QR code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1796
Fix "Fixed" Animation Bug
This PR fixes the issue where the Fixed animation doesn't behave as expected. Instead of remaining fixed, it can clip the text and may even get transferred as the Splitting animation.
What was causing the issue?
The app was identifying the selected animation by comparing object instances (
==). This works only when the exact same instance is reused. If a new instance of the same animation class is created, the comparison fails, causing the app to fall back to the wrong animation during transfer.What's changed?
I updated
lib/badge_animation/animation_abstract.dartto make animation comparisons based on the animation type instead of object identity.By overriding
==andhashCodein theBadgeAnimationbase class to compareruntimeType, different instances of the same animation (for example, twoFixedAnimationobjects) are now treated as equal.This ensures the correct animation is recognized and transferred, preventing the unexpected fallback behavior.
WhatsApp.Video.2026-07-07.at.1.10.01.AM.mov