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

Expanded Conversation Attachments #2895

Open
wants to merge 13 commits into
base: development
Choose a base branch
from

Conversation

DeveloperBlue
Copy link

@DeveloperBlue DeveloperBlue commented Feb 16, 2025

Hope everyone's doing well, this is my first flutter PR.

This PR allows you to:

  • See all local attachments for a conversation
  • Filter attachments by sender, type, date, and search
  • Jump to the attachment message in the conversation

Viewing More Attachments

BB.-.More.Attachments.mp4

Filtering Attachments

BB.-.Attachment.Filtering.1.mp4
BB.-.Attachment.Filtering.2.mp4

Attachment Popups

BB.-.Attachment.Popup.mp4

Jump to Message

BB.-.Jump.To.Message.mp4

Additional Information

  • Advanced filtering allows you to search for a specific sender in group chats instead of just the general "From Others".
  • When the "High Performance" setting is enabled, the search bar switches from live search (searching on every character) to presenting the user with a manual submission button.
  • Adds a small "From (CONTACT)" button/label to the media viewer. This button also lets you jump to the message location in the conversation.
  • The Attachments Popup widgets are taken from the Message Popup widgets. They were heavily modified but do include some duplicate logic.
  • Had to add an "isEquals" checker method to the Handle object, because just comparing two objects (==) fails when their "fake" names under redacted mode are different.
  • Respects ordering the popup context menu's options based on user's "Message Options Order" settings.
  • Only the local attachments are shown. It does not fetch any attachments from the server. You can work around this by continually hitting the "Fetch More Messages" button on the Conversation Details page. If anyone understands the custom scroll views better, it could be useful to have it automatically pull the next 100 attachments when the user reaches the bottom of the scroll view.

Issues

  • ⚠ Sometimes the "Jump To Message" action gets stuck in an infinite pending state. Exiting the conversation and jumping again seems to fix this issue. This should be resolved before the PR is merged, and I need a little help figuring out why it does this. Area 1, Area 2

And some more extensive testing is required, since I was only able to test on my android emulator. I have yet to test the changes on the web or desktop builds. I'm @DeveloperBlue on the Discord as well.

@zlshames
Copy link
Member

zlshames commented Mar 6, 2025

An awesome addition to the app! The only change I'll request is that you center the filters in the popup window, to be consistent with other popup UIs (i.e. the search filtering).

I have a couple of questions as well:

Adds a small "From (CONTACT)" button/label to the media viewer. This button also lets you jump to the message location in the conversation.

Does this add it to all media viewer pages or just the one in the chat details?

The Attachments Popup widgets are taken from the Message Popup widgets. They were heavily modified but do include some duplicate logic.

If we make changes to the other popups (UI-wise), I assume we'll also need to also update the new message popup holder?

Sometimes the "Jump To Message" action gets stuck in an infinite pending state. Exiting the conversation and jumping again seems to fix this issue. This should be resolved before the PR is merged, and I need a little help figuring out why it does this. Area 1, Area 2

Our jump to message code is sometimes bugged, which is why some people get freezes/crashes when certain chats have it enabled. I don't have a fix at this time, so I think maybe removing it as a feature until we figure out how to better do it.

Otherwise... it looks great! Thank you for your contribution!

Copy link
Member

@zlshames zlshames left a comment

Choose a reason for hiding this comment

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

See my comments above

@DeveloperBlue
Copy link
Author

The only change I'll request is that you center the filters in the popup window, to be consistent with other popup UIs (i.e. the search filtering).

Is this what you mean by centering the filters? I've gone ahead and horizontally centered them with the last push, but I see that the filter for searching conversations is left-aligned on my other devices.

I've also removed/hid any UI for jumping to the attachment's message for now.


Does this add it to all media viewer pages or just the one in the chat details?

It is added to all media viewer pages. (Or more specifically, it's added to the existing media viewer page that all images/videos navigate to when you tap them.) Since I removed the Jump to Message feature for now, the button/label is now gone has been reverted to how it was before this PR.

If we make changes to the other popups (UI-wise), I assume we'll also need to also update the new message popup holder?

Yes. In the future, I think a global popup component could be designed and then extended from for both components. I wouldn't mind looking into this.

Please let me know if you have any more feedback, questions, or changes! Thanks again

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