Show whether cached achievements were unlocked offline or online - #91
Show whether cached achievements were unlocked offline or online#91JoseOcasio wants to merge 3 commits into
Conversation
0636f6c to
b7a0e8b
Compare
|
Did you maybe push the wrong branch? Your description doesn't match what I see in the app. There is a new entry "Achievements" |
This should be correct, you might be looking at a stale version of this PR. I did a rewrite and amended the entire thing. Re pull the branch so you can see the latest TLDR: I went in a very different path when I opened this PR and talked myself out of it and rewrote the entire thing |
| <string name="cached_game_origin_offline">Offline</string> | ||
| <string name="cached_game_origin_online">Online</string> | ||
| <string name="cached_game_origin_syncing">Syncing</string> |
There was a problem hiding this comment.
1. Syncing can never show up. A queued award never gets written to the cached unlocks, so unlocked is still false while it's pending. The !achievement.unlocked -> null branch catches it first and the pending check never runs. Those rows are hidden from the list anyway unless "show locked" is on.
2. Online claims something we can't know. Offline is backed by a real record. Online is just the absence of one, and an achievement earned through the proxy can easily end up without a record:
- Earned through the app while online: the request goes straight to RA and nothing is ever queued. That's normal use, not an edge case.
- Any database schema bump wipes the award history on update.
- Reinstall, or the same account on another device.
So the tag really means "this install has no record of syncing it", which is a different claim. I'd rather only tag what we can prove: keep Offline (and Syncing once it works) and leave the rest untagged.
There was a problem hiding this comment.
Solid feedback. Fixed. Review.
In the Cached Games achievement dropdown, each unlocked achievement now shows a small tag for how it was earned:
The origin is derived from the award queue (pending + flushed history), so it stays fully offline and adds no network calls. Locked achievements are unaffected.
Note: the Offline tag comes from Awards History, so clearing award history will make those achievements show as Online, and it only reflects unlocks earned through this app.