Skip to content

Fix inconsistency in getQuantity and add docs#13293

Merged
TobiGr merged 1 commit intodevfrom
getQuantity-inconsistency
Feb 26, 2026
Merged

Fix inconsistency in getQuantity and add docs#13293
TobiGr merged 1 commit intodevfrom
getQuantity-inconsistency

Conversation

@Stypox
Copy link
Copy Markdown
Member

@Stypox Stypox commented Feb 26, 2026

What is it?

  • Codebase improvement (dev facing)

Description of the changes in your PR

getQuantity() was being called in a couple of places with zeroCaseStringId=0, but that wasn't documented anywhere, and if count==0 then getString(zeroCaseStringId /* == 0 */) would be returned which doesn't make sense. So now getQuantity will use the normal plural resource instead if both count == 0 and zeroCaseStringId == 0. I don't think this ever caused issues anywhere, because count was never 0 when those functions were called with zeroCaseStringId == 0, but still let's be sure.

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions Bot added the size/small PRs with less than 50 changed lines label Feb 26, 2026
`getQuantity()` was being called in a couple of places with `zeroCaseStringId=0`, but that wasn't documented anywhere, and if `count==0` then `getString(zeroCaseStringId /* == 0 */)` would be returned which doesn't make sense
@Stypox Stypox force-pushed the getQuantity-inconsistency branch from f01aa87 to e22b046 Compare February 26, 2026 18:08
@TobiGr TobiGr merged commit bf16332 into dev Feb 26, 2026
5 checks passed
@TobiGr TobiGr mentioned this pull request Feb 28, 2026
1 task
@theimpulson theimpulson deleted the getQuantity-inconsistency branch April 16, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/small PRs with less than 50 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants