Skip to content

Copy post and comment information to clipboard#850

Merged
twizmwazin merged 5 commits into
LemmyNet:mainfrom
Noxor11:copy_thumbnail_url_and_comment
Jun 23, 2023
Merged

Copy post and comment information to clipboard#850
twizmwazin merged 5 commits into
LemmyNet:mainfrom
Noxor11:copy_thumbnail_url_and_comment

Conversation

@Noxor11

@Noxor11 Noxor11 commented Jun 23, 2023

Copy link
Copy Markdown
Contributor

Allows to copy the thumbnail url of a post if available, and copy a comment made to a post.

@MV-GH

MV-GH commented Jun 23, 2023

Copy link
Copy Markdown
Collaborator

The three composables are almost the change them into a generic something like MyThumbnailCopy and pass the differences as arguments

@Noxor11

Noxor11 commented Jun 23, 2023

Copy link
Copy Markdown
Contributor Author

Comments don't have thumbnails, but I agree the common code should be contained in a method or class

@twizmwazin twizmwazin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One other thing, I'm noticing that the dialog is not being dismissed after selecting the added options. If you're feeling up to it, maybe add in the option to copy post text as well while we're here.

Comment thread app/src/main/java/com/jerboa/util/ClipboardCopyHandler.kt Outdated
Comment thread app/src/main/java/com/jerboa/util/ClipboardCopyHandler.kt Outdated
Comment thread app/src/main/java/com/jerboa/ui/components/post/PostListing.kt Outdated
Comment thread app/src/main/res/values/strings.xml Outdated
Comment thread app/src/main/res/values/strings.xml Outdated
Comment thread app/src/main/res/values/strings.xml Outdated
@Noxor11

Noxor11 commented Jun 23, 2023

Copy link
Copy Markdown
Contributor Author

I just realized there's an Utils file, so I used that to place the new function.
Now the popup gets dismissed after clicking, and added ability to copy title, name, and text from a post.

@Noxor11 Noxor11 requested a review from twizmwazin June 23, 2023 20:12
@Noxor11 Noxor11 changed the title copy thumbnail url if available and comment copy post and comment information to clipboard Jun 23, 2023
@Noxor11 Noxor11 changed the title copy post and comment information to clipboard Copy post and comment information to clipboard Jun 23, 2023
@twizmwazin twizmwazin enabled auto-merge (squash) June 23, 2023 22:22
@twizmwazin twizmwazin merged commit 243bc22 into LemmyNet:main Jun 23, 2023
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.

3 participants