Skip to content

fix(media): handle app card cover fallback#6440

Open
SeniorZhai wants to merge 3 commits into
masterfrom
fix/review-feedback
Open

fix(media): handle app card cover fallback#6440
SeniorZhai wants to merge 3 commits into
masterfrom
fix/review-feedback

Conversation

@SeniorZhai

Copy link
Copy Markdown
Member

No description provided.

@SeniorZhai SeniorZhai requested a review from Copilot June 5, 2026 15:01
@SeniorZhai SeniorZhai added the testing Now testing, but you can review label Jun 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 improves media viewing behavior for App Card messages by correctly resolving cover URLs when the cover is provided via the nested cover.url field (instead of only cover_url), and by preventing the media pager from proceeding when the target “media message” can’t be found/doesn’t qualify.

Changes:

  • Add AppCardData.hasCover and use it to detect whether an App Card should be treated as having media cover.
  • Update MessageItem.appCardCoverUrl() to fall back to cover.url when cover_url is blank/empty.
  • Harden media pager indexing/loading to handle “not found” cases and filter out App Cards without a usable cover.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/src/test/java/one/mixin/android/vo/AppCardDataTest.kt Adds a unit test to ensure nested cover.url is treated as a valid cover source.
app/src/main/java/one/mixin/android/vo/MessageItem.kt Adds isAppCardWithCover() helper for cover-aware App Card filtering.
app/src/main/java/one/mixin/android/vo/AppCardData.kt Introduces hasCover and updates appCardCoverUrl() to ignore blank strings and fall back properly.
app/src/main/java/one/mixin/android/ui/media/pager/MediaPagerActivity.kt Stops media paging flow early when the indexed target can’t be located.
app/src/main/java/one/mixin/android/repository/ConversationRepository.kt Validates media message eligibility (exclude-live constraints + App Card cover presence) before indexing/returning media messages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/main/java/one/mixin/android/vo/AppCardData.kt Outdated
@SeniorZhai SeniorZhai force-pushed the fix/review-feedback branch from f76e978 to aa3f6f0 Compare June 5, 2026 15:07
@SeniorZhai SeniorZhai removed the testing Now testing, but you can review label Jun 16, 2026
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