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

PostEdit implements Hashable #145

Merged
merged 2 commits into from
Apr 16, 2023
Merged

PostEdit implements Hashable #145

merged 2 commits into from
Apr 16, 2023

Conversation

technicat
Copy link
Contributor

Seems like many or most of the TootSDK models implement Hashable, but PostEdit doesn't and in this case I need PostEdit to be Hashable to pass to a custom NavigationStack path like this:

enum Route : Hashable {
    case postDetail(Post)
    case postEdit(PostEdit)
    case profile(Account)
    case reply(Post)
}

Seems like many or most of the TootSDK models implement Hashable, but PostEdit doesn't and in this case I need PostEdit to be Hashable to pass to a custom NavigationStack path like this:

```
enum Route : Hashable {
    case postDetail(Post)
    case postEdit(PostEdit)
    case profile(Account)
    case reply(Post)
}
```
Copy link
Contributor

@davidgarywood davidgarywood left a comment

Choose a reason for hiding this comment

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

🙏

Copy link
Contributor

@kkostov kkostov left a comment

Choose a reason for hiding this comment

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

🎉

The comment doc for url and staticUrl were swapped, or another way to put it is the var declarations were swapped, so I just swapped the var declarations to match the order in the Mastodon doc

https://docs.joinmastodon.org/entities/CustomEmoji/
@kkostov kkostov merged commit 02b9ac9 into TootSDK:main Apr 16, 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.

None yet

3 participants