Skip to content

rencode several videos at the same time when sharing to a single chat#4430

Open
adbenitez wants to merge 7 commits into
mainfrom
adb/issues-3928
Open

rencode several videos at the same time when sharing to a single chat#4430
adbenitez wants to merge 7 commits into
mainfrom
adb/issues-3928

Conversation

@adbenitez

@adbenitez adbenitez commented May 13, 2026

Copy link
Copy Markdown
Member

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 ConversationListRelayingActivity which makes it impossible to display the wait 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 chat

close #3928

@adbenitez
adbenitez requested review from r10s and wchen342 May 13, 2026 16:15
@adbenitez adbenitez self-assigned this May 13, 2026
@github-actions

Copy link
Copy Markdown

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@github-actions

Copy link
Copy Markdown

To test the changes in this pull request, install this apk:
📦 app-preview.apk

Comment thread CHANGELOG.md Outdated
AtomicReference<ProgressDialog> progressDialogRef = new AtomicReference<>(null);
boolean hasVideos = containsVideoType(context, uris);
boolean isFinishing = context instanceof Activity && ((Activity) context).isFinishing();
if (hasVideos && !isFinishing) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The finishing check needs to be on main, otherwise it may be outdated when ProgressDialog.show runs.

}
}

ProgressDialog dialog = progressDialogRef.get();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This shall be on main too I think.

@github-actions

Copy link
Copy Markdown

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@github-actions

Copy link
Copy Markdown

To test the changes in this pull request, install this apk:

📦 app-preview.apk

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.

videos not always recoded

2 participants