rencode several videos at the same time when sharing to a single chat#4430
Open
adbenitez wants to merge 7 commits into
Open
rencode several videos at the same time when sharing to a single chat#4430adbenitez wants to merge 7 commits into
adbenitez wants to merge 7 commits into
Conversation
|
To test the changes in this pull request, install this apk: |
|
To test the changes in this pull request, install this apk: |
wchen342
reviewed
May 14, 2026
wchen342
reviewed
May 14, 2026
wchen342
reviewed
May 14, 2026
| AtomicReference<ProgressDialog> progressDialogRef = new AtomicReference<>(null); | ||
| boolean hasVideos = containsVideoType(context, uris); | ||
| boolean isFinishing = context instanceof Activity && ((Activity) context).isFinishing(); | ||
| if (hasVideos && !isFinishing) { |
Collaborator
There was a problem hiding this comment.
The finishing check needs to be on main, otherwise it may be outdated when ProgressDialog.show runs.
wchen342
reviewed
May 14, 2026
| } | ||
| } | ||
|
|
||
| ProgressDialog dialog = progressDialogRef.get(); |
Collaborator
There was a problem hiding this comment.
This shall be on main too I think.
|
To test the changes in this pull request, install this apk: |
|
To test the changes in this pull request, install this apk: |
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.
I gave up for now in trying to also encode them when sharing to several chats at the same time after trying several things, because the current sharing logic is too complicated heavily relays on finishing the
ConversationListRelayingActivitywhich makes it impossible to display thewait a moment...dialog and also the way we send to multiple chats needs to change first to instead of iterating over every chat and then send all messages into it, to: iterate over every message and send to all chats, otherwise the same video is re-encoded over and over again one time per chat it is sent so the waiting time multiplies per chatclose #3928