Mlem
Mlem copied to clipboard
Handle links in app
Checklist
- [x] I have described what this PR contains
Choose one of the following two options:
-
- [ ] This PR does not introduce major changes
-
- [x] This PR introduces major changes, and I have consulted the Mlem Development Matrix room (not really, I should really look into what this whole Matrix room is about 😅 )
Choose one of the following two options:
-
- [x] This PR does not change the UI in any way
-
- [ ] This PR adds new UI elements / changes the UI, and I have attached pictures or videos of the new / changed UI elements
Pull Request Information
About this Pull Request
The gist is that if you click a link in a post that looks like it's another Lemmy post/community/user we'll open that in app and not in Safari! but here're the more detailed change log since it was no easy task:
- changed all the NavigationLinks to the new iOS 16 style "value" oriented
- doing that allowed us to push/pop anything we want to the navigation stack
- added new link handling, now if a link looks even remotely "sus" I will ask Lemmy's servers if they know it, if they do know it: We push the appropriate object to the navigation stack if they don't know about it and it's an HTTP link, kept the old behavior otherwise I let the system try to open it (which is way nicer than telling the user "it's not supported" especially for mailto: links XD
Screenshots and Videos
https://github.com/mormaer/Mlem/assets/6067331/38e5c89e-cbaa-4312-a866-3516f901a84f
(It's less helpful since you don't see where I'm tapping 😅 but I hope you understood from context that Im pressing on each individual representation of these links)
Additional Context
Nice!
I'll get a look at this but likely tomorrow at the earliest, if you're looking for the matrix chat here's a link which I think should work;
https://matrix.to/#/%23MlemApp%3Amatrix.org
Once there we should be to get you into the dev chat if you like 👍
Ahaha I’m already there (General and recruitment) and just saw the invite to dev,, I’ll try to be just as active there as I am here
I
https://github.com/mormaer/Mlem/assets/6067331/26433888-1539-41ac-8a18-aa298edd49d9
'd say it's looking pretty good
I'd say I have to agree with your statement