ADFA-4446: Invalidate Glide's cache when a plugin icon file changes - #1633
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 Walkthrough
WalkthroughThe plugin list adapter now uses localized author and status labels, indexed resource-backed popup actions, and icon file timestamps for Glide cache signatures. Existing metadata, interaction, fallback, and diff behavior remains intact. ChangesPlugin list adapter
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt`:
- Around line 77-85: Move the icon metadata work out of onBindViewHolder in
PluginListAdapter: precompute or cache the resolved icon file path, existence,
and lastModified timestamp on a background thread, then pass the resulting data
into row binding. Update the Glide load/signature logic to use the precomputed
metadata without calling File.exists() or File.lastModified() during binding.
- Around line 167-170: Update PluginListAdapter.areContentsTheSame to account
for icon file changes in addition to PluginInfo equality, or otherwise force a
rebind when the icon’s lastModified value changes. Ensure bind executes for
file-only icon updates so Glide refreshes the displayed icon.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 473850f8-1578-4a2f-9590-6daf3eac09c3
📒 Files selected for processing (1)
app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt (1)
26-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the public
Actioncontract.
Actionis a public enum, andlabelResis now part of its public API. Add KDoc for the enum and explain thatlabelResidentifies the localized popup label.Proposed KDoc
+ /** + * Actions available from a plugin row. + * + * `@property` labelRes resource ID for the localized popup label. + */ enum class Action(As per coding guidelines, public classes and functions must have KDoc or Javadoc for their contracts.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt` around lines 26 - 32, Add KDoc to the public Action enum describing its purpose, and document the labelRes property as the resource identifier for its localized popup label. Keep the existing enum values and API unchanged.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.kt`:
- Around line 26-32: Add KDoc to the public Action enum describing its purpose,
and document the labelRes property as the resource identifier for its localized
popup label. Keep the existing enum values and API unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f6f5546c-f940-4e23-a415-9dca9bb0882a
📒 Files selected for processing (2)
app/src/main/java/com/itsaky/androidide/adapters/PluginListAdapter.ktresources/src/main/res/values/strings.xml
No description provided.