Skip to content

Conversation

tht7
Copy link
Contributor

@tht7 tht7 commented Jun 23, 2023

Checklist

  • I have described what this PR contains

Choose one of the following two options:

    • This PR does not introduce major changes
    • 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:

    • 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

IMG_7203.mov

(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

tht7 and others added 3 commits June 23, 2023 16:02
…ented

- 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
@ShadowJonathan ShadowJonathan requested a review from mormaer June 23, 2023 14:15
Itay sharzer and others added 6 commits June 23, 2023 18:38
…in there SwiftUI should pick up on it better (that solved a bug where the upvote/downvotes weren't updating correctly sometimes

- updated every place that expects APIPostView.id == APIPostView.post.id to reference the correct id (usually .post.id)
- Since ExpandedPost is not more independent made the postView within it it's state
…n-app

# Conflicts:
#	Mlem.xcodeproj/project.pbxproj
…n-app

# Conflicts:
#	Mlem/Views/Tabs/Posts/Components/Post/Components/Community View/Community Search/Community Search View.swift
@mormaer
Copy link
Collaborator

mormaer commented Jun 23, 2023

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 👍

@tht7
Copy link
Contributor Author

tht7 commented Jun 23, 2023

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

@tht7
Copy link
Contributor Author

tht7 commented Jun 24, 2023

I

RPReplay_Final1687607587.mov

'd say it's looking pretty good

Had to commit some more crims to keep the SwiftUI state all synced up nicely
Made sure to noty double up on the NavigationStack in the user page since it really crashs everything for some reason
@Emiliaaah
Copy link

I'd say I have to agree with your statement

@BrooklynMan BrooklynMan merged commit 00c08ca into mlemgroup:master Jun 25, 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.

Lemmy links are not correctly recognised
4 participants