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

Add deeplinks for createPost #178

Merged
merged 6 commits into from
Jul 7, 2022
Merged

Conversation

LunaticHacker
Copy link
Contributor

for #163,

  • Jerboa appears in share sheet for plain text
  • URLs and other text are handled in createPost Deeplink

we should be able to handle sharing images too but i don't understand how the PickImage thing works :)

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

I tested this with a few browsers, and it seems to copy both the title and URL into the body field. It needs to copy the title -> title, and URL -> url

@LunaticHacker
Copy link
Contributor Author

I tested this with a few browsers, and it seems to copy both the title and URL into the body field. It needs to copy the title -> title, and URL -> url

That would be ideal. but we can't determine what is title and url from plain text, only whether the text is a url or not

app/src/main/java/com/jerboa/MainActivity.kt Outdated Show resolved Hide resolved
@@ -152,6 +153,24 @@ fun PickImage(
mutableStateOf<Bitmap?>(null)
}

if (image != null) {
Copy link
Member

Choose a reason for hiding this comment

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

God I hate kotlin null safety. Rust options are so much better.

@dessalines
Copy link
Member

Oops I forgot one more thing: make sure when doing a URL share, that it tries to fetch the post title

@LunaticHacker LunaticHacker force-pushed the share_to branch 2 times, most recently from bfd49a4 to e170807 Compare July 7, 2022 06:44
Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

Works great, thx a ton!

@dessalines dessalines enabled auto-merge (squash) July 7, 2022 12:55
@dessalines dessalines merged commit d4b26ff into LemmyNet:main Jul 7, 2022
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.

None yet

2 participants