Skip to content

Show whether cached achievements were unlocked offline or online - #91

Open
JoseOcasio wants to merge 3 commits into
misantronic:mainfrom
JoseOcasio:feature/achievements-visibility
Open

Show whether cached achievements were unlocked offline or online#91
JoseOcasio wants to merge 3 commits into
misantronic:mainfrom
JoseOcasio:feature/achievements-visibility

Conversation

@JoseOcasio

@JoseOcasio JoseOcasio commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

In the Cached Games achievement dropdown, each unlocked achievement now shows a small tag for how it was earned:

  • Offline — unlocked through this proxy (it's in Awards History)
  • Syncing — earned offline, still queued to sync
  • Online — unlocked, but not through this app (already on the account when the game was cached)

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.

@misantronic misantronic added enhancement New feature or request Android labels Aug 9, 2026
@misantronic misantronic self-assigned this Aug 9, 2026
@misantronic
misantronic self-requested a review August 9, 2026 23:28
@JoseOcasio
JoseOcasio marked this pull request as draft August 9, 2026 23:45
@JoseOcasio
JoseOcasio force-pushed the feature/achievements-visibility branch from 0636f6c to b7a0e8b Compare August 9, 2026 23:49
@JoseOcasio JoseOcasio changed the title Add Achievements screen and Home progress summary Show whether cached achievements were unlocked offline or online Aug 9, 2026
@JoseOcasio
JoseOcasio marked this pull request as ready for review August 9, 2026 23:50
@misantronic

Copy link
Copy Markdown
Owner

Did you maybe push the wrong branch? Your description doesn't match what I see in the app. There is a new entry "Achievements"

@JoseOcasio

JoseOcasio commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

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

Comment thread app/src/main/res/values/strings.xml Outdated
Comment on lines +269 to +271
<string name="cached_game_origin_offline">Offline</string>
<string name="cached_game_origin_online">Online</string>
<string name="cached_game_origin_syncing">Syncing</string>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Solid feedback. Fixed. Review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants