fix: Small adjustment to fix epic offline mode caching.#1566
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR modifies how Epic's offline launch mode is determined in ChangesEpic Offline Mode Parameter
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| val runArguments: List<String> = runBlocking { | ||
| val offlineLaunch = offline || container.isEpicOfflineMode; | ||
| val result = EpicService.buildLaunchParameters(context, container, game, offlineLaunch) | ||
| val result = EpicService.buildLaunchParameters(context, container, game, container.isEpicOfflineMode) |
There was a problem hiding this comment.
Not sure this is right - offline is coming from whether we are in offline mode at the app level, not detecting if we are offline afaict. Could you please confirm and point out where you think offline mode is being set/cached if so?
There was a problem hiding this comment.
From my testing XServerScreen gives inconsistent results for "offline" even if my device is clearly online.
I believe it's better for the behaviour of Epic for it to check for offline toggle, and fail graciously if the device is offline and the toggle is off.
This way, there's no oddities regarding Epic being launched offline when it should happen online.
There was a problem hiding this comment.
offline for Epic is hardcoded false at PluviaMain.kt:362 though, no? So this change shouldn't make any difference at all. If you're seeing this bug then it's likely from somewhere else, unless I'm wrong and offline is ever true. Could you please check?
Description
Small change that removes the detection for Offline from the starting of Epic Games:
We had a bug where the isOffline check was getting into an incorrect state and wrongly reporting as "true" even if the device was online. The best thing for us to do is pass only the container state for isEpicOffline and if the device is offline and fails to reach Epic's servers, it'll automatically launch offline.
Recording
Type of Change
Checklist
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.CONTRIBUTING.md.Summary by cubic
Fix Epic launch offline-mode caching by removing ad-hoc offline detection and using only
container.isEpicOfflineModewhen building launch parameters. Prevents false offline launches while still allowing Epic to auto-launch offline if the network is unavailable.Written for commit c64da25. Summary will update on new commits.
Summary by CodeRabbit
Release Notes