Repository navigation
K2GO-449 refactor(app): generalize Forgejo's gated update action into ModuleActions - #655
Merged
Merged
Conversation
… ModuleActions Add an optional Gate to ModuleActions.InstalledAction (a check run off the main thread) and register Forgejo 'Update repos' as a gated entry. ModuleActionSheet now iterates the registry for both plain and gated entries, dropping its forgejo-keyed update-action branch. ModuleDetailFragment applies only ungated registry entries; its richer Forgejo install-repos/blocked/update flow, the repos opt-in checkbox and the seed prefs stay module-specific by design.
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.
Fourth K2GO-449 slice. Moves Forgejo's installed-state "Update repos" action out of
the per-module "forgejo".equals(key) branch in ModuleActionSheet and into the
ModuleActions registry, so the shared UI stops carrying a per-module branch.
main thread). Forgejo registers as a gated entry; ForgejoStatusClient runs only
inside the gate lambda, not at class load.
iteration handles both: plain entries (Add-ons / Build assets) add the row
synchronously; a gated entry runs canShow() on AppExecutors.io() and inserts the
row after "About" only when true and the sheet is still showing.
detail keeps its own richer Forgejo flow (install-repos / blocked / update, the
repos opt-in checkbox, bankSeed/clearSeed). Its install-options "forgejo".equals
is intentionally retained.
Verification: build + lint green; two-pass review. Device-checked (Samsung A16):
Add-ons and Build assets action sheets render their update row after "About" with no
crash. Forgejo is not installed on the test box, so its gated branch is a faithful
move of the removed sheet branch (same fetch, same after-About insertion, same
showing-guard), build- and review-verified.