Completed runs on play button - #1820
Open
ArthurKun21 wants to merge 3 commits into
Open
Conversation
ArthurKun21
force-pushed
the
completed-run-on-play-button
branch
2 times, most recently
from
May 31, 2024 03:09
19dc715 to
f05e138
Compare
ArthurKun21
force-pushed
the
completed-run-on-play-button
branch
from
June 8, 2024 21:57
f05e138 to
648b3d6
Compare
ArthurKun21
force-pushed
the
completed-run-on-play-button
branch
from
May 8, 2025 22:33
648b3d6 to
cc742f2
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds functionality to update and display the number of completed runs, triggered via the play button.
- Added a new updateCompletedRuns method to the preferences interface and its implementations.
- Updated Battle.kt to call updateCompletedRuns using the current run state and modified the UI in ScriptRunnerUI.kt to display the completed runs count.
- Enhanced PrefsCore.kt to persist the completed runs value and adjusted BattleLauncher.kt to reset it on launch.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/src/main/java/io/github/fate_grand_automata/scripts/prefs/IPreferences.kt | Added updateCompletedRuns with a default parameter. |
| scripts/src/main/java/io/github/fate_grand_automata/scripts/modules/Battle.kt | Calls updateCompletedRuns with the current run count. |
| prefs/src/main/java/io/github/fate_grand_automata/prefs/core/PrefsCore.kt | Introduced persistent storage for completedRuns. |
| prefs/src/main/java/io/github/fate_grand_automata/prefs/Preferences.kt | Implemented the updateCompletedRuns method. |
| app/src/main/java/io/github/fate_grand_automata/ui/runner/ScriptRunnerUI.kt | Displays the completed runs count in the battle UI. |
| app/src/main/java/io/github/fate_grand_automata/ui/launcher/BattleLauncher.kt | Invokes updateCompletedRuns with no argument to reset the count. |
Comments suppressed due to low confidence (1)
app/src/main/java/io/github/fate_grand_automata/ui/launcher/BattleLauncher.kt:146
- Verify that invoking updateCompletedRuns() without an argument—thereby resetting the completed runs count to 0—is intended behavior in this context.
prefs.updateCompletedRuns()
Collaborator
Author
|
it has been 2 years, I don't think this is going to be possibly be added |
reconman
force-pushed
the
completed-run-on-play-button
branch
from
August 31, 2026 21:27
cc742f2 to
8e52f7d
Compare
Build 1362Download the latest APK for testing here Note You need a GitHub account to download the APK. This URL is valid as long as the artifact has not expired yet. |
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.
No description provided.