4.0.0-beta03 fixes: Fix drag bounds, decimal display, backup warning/corruption, scenario stats, and branded DontKillMyApp link#934
Open
vibhor1102 wants to merge 6 commits into
Conversation
The first ever scenario created or opened had a small margin of unboundable area specifically on the right edge. After closing the scenario overlay and reopening it, or during subsequent runs, the dead area disappeared. This first-run bug has been present since 1.5.0 but was never caught.
4539a88 to
f6bd042
Compare
Contributor
Author
|
Thanks @ohlalayeah for helping in discovery of truncation bug |
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.
Summary
This PR contains six fixes/improvements for the 4.0.0-beta03 stabilization branch:
.0and.00suffixes from counter-style values across the app.https://dontkillmyapp.com?app=Klick%27r) to offer users a tailored troubleshooting page.Backup ZIP corruption on overwrite
When overwriting an existing backup file, the default SAF write mode
"w"does not truncate the file on some devices (e.g. Xiaomi/MIUI/HyperOS). If the new ZIP file is smaller than the old one, the trailing data of the old ZIP (including its EOCD and Central Directory) remains at the end of the file, leading to multiple EOCDs and structural ZIP corruption.This change opens the output stream with mode
"wt"to guarantee truncation, and movesprogress.onCompletedoutside theZipOutputStreamblock so that completion is only triggered after the stream has written all metadata and closed.Special thanks to @ohlalayeah for providing the initial corrupted backup file (KlickrSmartAutoClicker-BackupMiPad6SPro.20260704.zip) that helped isolate this truncation issue.
Scenario usage statistics
The stats queries in
ScenarioDaoandDumbScenarioDaopreviously queried the stats table usingWHERE id = :scenarioId. Sinceidis the auto-generated primary key of the stats row itself (and not the scenario's ID), the query fetched the wrong stats row (or returnednulland inserted duplicates) and misattributed the stats to a different scenario.This change updates the queries to correctly use
WHERE scenario_id = :scenarioIdandWHERE dumb_scenario_id = :scenarioId.Decimal display behavior
Counter values now use a natural display format at UI boundaries:
1.0is displayed as11.50is displayed as1.51.25remains1.25Storage, parsing, migrations, and counter calculations remain unchanged. Numeric fields still accept decimals as before, and saved decimal precision is preserved when editing.
Backup screen compatibility
The backup check previously compared width and height in their original order. As a result, a scenario exported in landscape at
2400 x 1080and imported in portrait at1080 x 2400was reported as coming from a different screen, even on the same phone.The check now accepts either the original dimensions or the same dimensions swapped by rotation. A genuinely different resolution still produces the compatibility warning.
Branded DontKillMyApp link
Uses the branded URL
https://dontkillmyapp.com?app=Klick%27rin the accessibility troubleshooting dialog so users get the custom-tailored guidance for Klick'r.Verification
2400 x 1080while the phone reported1080 x 2400during import.