Skip to content

Fix sub BannerText loading shields for first time#1446

Merged
danesfeder merged 1 commit into
masterfrom
dan-iv-cutoff
Oct 23, 2018
Merged

Fix sub BannerText loading shields for first time#1446
danesfeder merged 1 commit into
masterfrom
dan-iv-cutoff

Conversation

@danesfeder
Copy link
Copy Markdown
Contributor

The first time we are showing the sub_instruction_layout.xml, TextView#getWidth() is returning 0, because it hasn't been drawn on the screen yet. Our truncateImageSpan method was seeing this and returning "" because it thinks there isn't any room to show anything. We should check the available space before we run that truncation code. FWIW, this truncation code should be less necessary with the abbreviation work.

We were seeing:

ezgif com-video-to-gif

This PR:

ezgif com-video-to-gif 1

@danesfeder danesfeder added bug Defect to be fixed. ✓ ready for review labels Oct 22, 2018
@danesfeder danesfeder added this to the 0.22.0 milestone Oct 22, 2018
@danesfeder danesfeder self-assigned this Oct 22, 2018
Copy link
Copy Markdown
Contributor

@Guardiola31337 Guardiola31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @danesfeder 🚢

@danesfeder danesfeder merged commit 486883d into master Oct 23, 2018
@danesfeder danesfeder deleted the dan-iv-cutoff branch October 23, 2018 12:55
@danesfeder danesfeder mentioned this pull request Oct 24, 2018
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Defect to be fixed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants