-
Notifications
You must be signed in to change notification settings - Fork 189
Redo OPDS feed to use SwiftUI #671
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
base: develop
Are you sure you want to change the base?
Conversation
| id = publication.links.first(where: { $0.rels.contains(.self) })?.href | ||
| ?? publication.metadata.identifier | ||
| ?? publication.metadata.title | ||
| ?? UUID().uuidString |
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.
This is somewhat fragile because you could have multiple publications with the same identifier (unlikely) or title (likely). This means we must later use the .unique() trick, which should not be necessary.
Instead, I would use the index of the publication in the feed list for ID, as it should not change during the rendition of the feed. Maybe prefixed with the feed URL (and the index of a group if needed?, so that it would look like 1.4).
What do you think?
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.
Let me know how the fix looks.
This PR redoes the OPDS feed screens to use SwiftUI and removes their old UIKit counterparts.