-
Notifications
You must be signed in to change notification settings - Fork 169
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
Conversation
There was a problem hiding this 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
app/src/main/java/com/jerboa/ui/components/post/create/CreatePostActivity.kt
Show resolved
Hide resolved
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/ui/components/post/create/CreatePost.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/jerboa/ui/components/common/PictrsImage.kt
Outdated
Show resolved
Hide resolved
@@ -152,6 +153,24 @@ fun PickImage( | |||
mutableStateOf<Bitmap?>(null) | |||
} | |||
|
|||
if (image != null) { |
There was a problem hiding this comment.
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.
Oops I forgot one more thing: make sure when doing a URL share, that it tries to fetch the post title |
bfd49a4
to
e170807
Compare
There was a problem hiding this 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!
* use existing regex from Android.Utils.Patterns to match urls * trigger onChangeurl initially to fetch suggested title
for #163,
we should be able to handle sharing images too but i don't understand how the PickImage thing works :)