Show game download status - #103
Conversation
5592e17 to
fd966c1
Compare
Simulator validationValidation head: iOS SimulatorVerified on iPhone 17 Pro / iOS 26.5:
The screenshot is an external GitHub Release asset and is not committed to the repository. Android EmulatorThe Android Debug APK built with 0 warnings/errors, installed on API 36, and cold-launched with an empty crash buffer. That AVD currently has no QA wallet and stops at wallet import, so I did not accept wallet terms on the user's behalf or attach a non-feature screenshot. |
There was a problem hiding this comment.
Pull request overview
Adds a persisted “download status” concept for WebView-based games, treating a successful first navigation as the local “download receipt” so lists/search can show loading and downloaded indicators.
Changes:
- Introduces
GameDownloadStatusServiceto persist and apply per-game receipts (version + URL) and to track in-session “downloading” state. - Updates game launch flow to mark a game as downloading on open, and as downloaded on successful in-domain navigation.
- Exposes localized, bindable status state on
DAppand wires UI templates to show a spinner/check badge plus accessible hint text.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| OneGateApp/Services/GameDownloadStatusService.cs | New service for tracking/persisting game download receipts and in-session download state. |
| OneGateApp/Data/DApp.cs | Adds DownloadStatus + derived bindable properties and introduces GameDownloadStatus enum. |
| OneGateApp/Pages/LaunchDAppPage.xaml.cs | Marks games downloading/downloaded based on WebView navigation lifecycle. |
| OneGateApp/Pages/LaunchDAppPage.xaml | Wires Navigated event to support download receipt updates. |
| OneGateApp/Pages/GamingPage.xaml.cs | Applies persisted statuses when games load and when the page appears. |
| OneGateApp/Pages/GamingPage.xaml | Displays spinner/check badge and exposes status text via semantic hint in templates. |
| OneGateApp/MauiProgram.cs | Registers GameDownloadStatusService in DI. |
| OneGateApp/Properties/Strings.resx | Adds base localized strings for required/downloading/downloaded status text. |
| OneGateApp/Properties/Strings.de.resx | Adds German localized download status strings. |
| OneGateApp/Properties/Strings.es.resx | Adds Spanish localized download status strings. |
| OneGateApp/Properties/Strings.fr.resx | Adds French localized download status strings. |
| OneGateApp/Properties/Strings.id.resx | Adds Indonesian localized download status strings. |
| OneGateApp/Properties/Strings.it.resx | Adds Italian localized download status strings. |
| OneGateApp/Properties/Strings.ja.resx | Adds Japanese localized download status strings. |
| OneGateApp/Properties/Strings.ko.resx | Adds Korean localized download status strings. |
| OneGateApp/Properties/Strings.nl.resx | Adds Dutch localized download status strings. |
| OneGateApp/Properties/Strings.pt-BR.resx | Adds Brazilian Portuguese localized download status strings. |
| OneGateApp/Properties/Strings.ru.resx | Adds Russian localized download status strings. |
| OneGateApp/Properties/Strings.tr.resx | Adds Turkish localized download status strings. |
| OneGateApp/Properties/Strings.vi.resx | Adds Vietnamese localized download status strings. |
| OneGateApp/Properties/Strings.zh-Hans.resx | Adds Simplified Chinese localized download status strings. |
| OneGateApp/Properties/Strings.zh-Hant.resx | Adds Traditional Chinese localized download status strings. |
| OneGateApp/Properties/Strings.Designer.cs | Exposes new localized keys via the generated designer. |
Files not reviewed (1)
- OneGateApp/Properties/Strings.Designer.cs: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| try | ||
| { | ||
| receipts ??= await dbContext.Settings.GetAsync<Dictionary<int, GameDownloadReceipt>>(SettingsKey) ?? []; | ||
| } | ||
| finally | ||
| { | ||
| initializationLock.Release(); | ||
| } |
| if (receiptChanged) | ||
| await dbContext.Settings.PutAsync(SettingsKey, receipts); | ||
| } |
| async void OnNavigated(object sender, WebNavigatedEventArgs e) | ||
| { | ||
| if (DApp is not { IsGamingApp: true } || !Uri.TryCreate(e.Url, UriKind.Absolute, out var uri)) | ||
| return; | ||
|
|
||
| Uri gameUri = new(DApp.Url); | ||
| if (uri.Scheme == "about" || IsCrossDomain(gameUri, uri)) | ||
| return; | ||
|
|
||
| if (e.Result == WebNavigationResult.Success) | ||
| await gameDownloadStatusService.MarkDownloadedAsync(DApp); | ||
| else | ||
| gameDownloadStatusService.ResetDownloading(DApp); | ||
| } |

Summary
Why
OneGate games are HTTPS WebView DApps; the catalog does not expose a native package or installer. This PR therefore treats a successful top-level WebView navigation as the honest local download/cache receipt instead of inferring state from recently played games.
Games that have not loaded successfully remain visually unmarked. A successful receipt is shown in search results, Recently played, and the main game list. Failed or abandoned first loads return to the required state.
Validation
net10.0-androidbuild: 0 warnings, 0 errorsnet10.0-ios/iossimulator-arm64build: 0 warnings, 0 errors.resxfiles parse as XML and have matching unique key setsSimulator screenshots are kept outside the repository and will be attached as external GitHub assets.