Fixed in https://github.com/badbundle/vault-app/pull/600 (merged as f5c00db3).
Root cause: the code was the only line on a card that could shrink freely. The HOTP card's refresh button made its bottom row taller than the TOTP card's timer bar, so whenever a card was tight (a two-line issuer, a narrow phone or a large text size), the HOTP code shrank and the TOTP code didn't.
Fix:
- Both card types now draw the code with one shared
OTPPreviewCodeTextview that holds its vertical size, so only the card's width decides the code's size. - The HOTP bottom row now takes only the bar's height.
- A second bug in
OTPCodeTextViewis fixed too: with 7-digit codes the last digit stayed full size while the other chunks shrank. Every chunk now scales evenly. - New
OTPCodePreviewCodeSizeSnapshotTestsrender HOTP and TOTP cards side by side, including the tight cases.