Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): custom attachment builders #1938

Merged
merged 3 commits into from
Jun 11, 2024
Merged

Conversation

deven98
Copy link
Contributor

@deven98 deven98 commented Jun 10, 2024

PR based on #1826

The attachment builder now expects custom attachments only and adds the attachment builders for the normal attachment types by default.

Old:

messageWidget.copyWith(
  // ....
  attachmentBuilders: [
    CustomBuilder()
    ...StreamAttachmentWidgetBuilder.defaultBuilders(message: messageDetails.message),
  ],
);

New:

messageWidget.copyWith(
  // ....
  attachmentBuilders: [
    CustomBuilder()
  ],
);

OR

messageWidget.copyWith(
  // ....
  attachmentBuilders: [
    ...StreamAttachmentWidgetBuilder.defaultBuilders(
      message: messageDetails.message,
        customAttachmentBuilders: [
           CustomBuilder(),
        ],
     ),
  ],
);

@deven98 deven98 marked this pull request as draft June 10, 2024 15:48
Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 60.28%. Comparing base (5ea210e) to head (e851030).

Files Patch % Lines
...tter/lib/src/message_widget/parse_attachments.dart 0.00% 2 Missing ⚠️
.../attachment/builder/attachment_widget_builder.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1938      +/-   ##
==========================================
- Coverage   60.28%   60.28%   -0.01%     
==========================================
  Files         317      317              
  Lines       18478    18479       +1     
==========================================
  Hits        11140    11140              
- Misses       7338     7339       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@deven98 deven98 marked this pull request as ready for review June 11, 2024 09:30
@deven98 deven98 changed the title fix: custom attachment builders fix(ui): custom attachment builders Jun 11, 2024
Copy link
Contributor

@Brazol Brazol left a comment

Choose a reason for hiding this comment

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

LGTM

@deven98 deven98 merged commit dc3aa45 into master Jun 11, 2024
18 of 20 checks passed
@deven98 deven98 deleted the fix/custom-attachment-builders branch June 11, 2024 09:48
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.

None yet

2 participants