Skip to content

feat: show share dialog only when sharing videos - #8938

Merged
FineFindus merged 3 commits into
libre-tube:masterfrom
FineFindus:feat/share-dialog-for-videos-only
Nov 29, 2026
Merged

FineFindus merged 3 commits into
libre-tube:masterfrom
FineFindus:feat/share-dialog-for-videos-only

Conversation

@FineFindus

Copy link
Copy Markdown
Collaborator

Shows the share dialog only when sharing videos, as it does not add any additional options when sharing playlists or channels. A further step towards eventually removing the dialog entirely.

Ref: #8811 (comment)

}
if (!isSharingVideo) {
shareLink(generateLinkText(binding))
return Dialog(requireContext())

@Bnyro Bnyro Nov 27, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a rather ugly hack to avoid refactoring all ShareDialog uses, perhaps it would be nicer to create a new showShareDialog method that just does

if (shareObjectType == ShareObjectType.VIDEO) {
    shareLink()
} else {
    ShareDialog().apply { .. }.show(..)
}

How much this is worth it depends on when you plan to completely drop the share dialog.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That logic, is the wrong way around, but yes, pretty much that was my idea as well :)

(Though considering that there are only two calls that share videos, I'm not sure, if it's worth it, or if we should rather just continue to use the ShareDialog directly/an explicit method for it)

@FineFindus
FineFindus merged commit 21f3528 into libre-tube:master Nov 29, 2026
5 checks passed
@FineFindus
FineFindus deleted the feat/share-dialog-for-videos-only branch November 29, 2026 16:27
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