Skip to content

Completed runs on play button#1820

Open
ArthurKun21 wants to merge 2 commits intomasterfrom
completed-run-on-play-button
Open

Completed runs on play button#1820
ArthurKun21 wants to merge 2 commits intomasterfrom
completed-run-on-play-button

Conversation

@ArthurKun21
Copy link
Copy Markdown
Collaborator

No description provided.

@ArthurKun21 ArthurKun21 force-pushed the completed-run-on-play-button branch 2 times, most recently from 19dc715 to f05e138 Compare May 31, 2024 03:09
@ArthurKun21 ArthurKun21 force-pushed the completed-run-on-play-button branch from f05e138 to 648b3d6 Compare June 8, 2024 21:57
@ArthurKun21 ArthurKun21 deleted the completed-run-on-play-button branch July 13, 2024 01:38
@ArthurKun21 ArthurKun21 restored the completed-run-on-play-button branch May 8, 2025 22:33
@ArthurKun21 ArthurKun21 reopened this May 8, 2025
@ArthurKun21 ArthurKun21 force-pushed the completed-run-on-play-button branch from 648b3d6 to cc742f2 Compare May 8, 2025 22:33
@ArthurKun21 ArthurKun21 requested a review from Copilot May 8, 2025 22:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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()

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 8, 2025

Build 204

Download 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants