-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Apply Coordinator Pattern and Add Deep-Links #155
Conversation
Add ConnectToServerCoodinator Add HomeCoordinator Add LibraryListCoordinator Add MainCoordinator Add MainTabCoordinator
This work looks great! Are you referencing any articles or tutorials for this? We need to make some contribution and developer docs for this project so that us and other contributors know what architectures are being used and what we have discussed and decided upon. We don't want someone in the future re-writing all of this on their own. |
I'm currently using https://github.com/rundfunk47/stinsen and referencing on an example and docs of that project. I think if you look at Swiftfin's code after the work is complete, you can easily understand the action and structure of each coordinator. |
looks great! |
@PangMo5 dont mean to bug, have you done any more work on this? I want to do view model refactoring after this. If your branch is up to date, I can help work on this if you would like. If not, that's okay |
First, the branch is up to date. But I'll proceed for now. It won't take too long. |
Add LibraryCoordinator Add SearchCoordinator Add SettingsCoordinator Update HomeCoordinator Update LibraryListCoordinator
rename router
# Conflicts: # JellyfinPlayer/SettingsView.swift # JellyfinPlayer/VideoPlayer.swift
The current implementation is complete, but the Coordinator has many duplicate codes and DeepLink does not work as expected. I created related question in Stinsen project. |
For now, I'm changed a PR state to get advice. |
I see the discussion going on in your issue and that he needs to do some work with a coordinator in a navigation stack. If this satisfies the needs for deep linking, I'm good with and support this work. I'm okay with the duplicate code here since it's due to a protocol. |
I need to think more about the deep link structure :( |
I don't see widgets in my simulator, maybe it's a simulator's problem. |
let userID = url.pathComponents[safe: 1], | ||
let itemID = url.pathComponents[safe: 3] | ||
{ | ||
// It would be nice if the ItemViewModel could be initialized to id later. |
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 will keep this in mind when I refactor how we handle media.
You have to search for the app and Jellyfin will be a result. Just a bug of the simulator. |
That's strange, try the iOS 15 simulator. The search is working for me there |
It's the same in 15 🤔 |
|
Ignore last comment. In the meantime, do a:
in As I have said, I'll fix all Session/server/user stuff. |
Interestingly, it seems to be a problem in only iOS 15. lol |
Oh, that is interesting. Sounds good to me |
Widgets work great on their own and are bugged out a little bit because of, guess what, the way we handle sessions/server/user. This doesn't stop the work here from being merged. |
# Conflicts: # JellyfinPlayer.xcodeproj/project.pbxproj # JellyfinPlayer.xcworkspace/xcshareddata/swiftpm/Package.resolved
Kudos, SonarCloud Quality Gate passed!
|
@acvigue Could this either be merged or I be given permission to merge? I think having this work in so that jhays can implement it in tvOS would be great. |
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.
Approving based on comment from @LePips.
With the Coordinator pattern,
View
lighter.Coordinators
Deep-Links
{UserID}
/Items/{ItemID}
Feel free to leave any advice on the current structure!