Refactor the Test App OPDS catalog UI #9
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors how the OPDS catalog UI is built. Instead of using non-Compose pure Kotlin and adding to views programmatically, it's entirely XML based like the rest of the app. This unfortunately means it has more lines of code, but
CatalogFragmentis significantly smaller. And with the DiffUtil of RecyclerView, it seems to be a little bit faster than before. There are still improvements that can be made, but can come back to it later. OPDS would be a great candidate for Jetpack Compose, depending how much of it can be done in chunks (especially with the NavGraph being all Kotlin).item_recycle_catalog_listtoitem_recycle_buttonand removed data binding in it. This offers better reusability of it, and data binding doesn't seem to be the future anymore, so will probably move away from it. I still want to use view binding though, as it doesn't require any changes to the XML and is type safe.CatalogDetailFragmenttoPublicationDetailFragment. I think this more accurately reflects what it is, since it's not really the detail screen of the entire catalog. So now we haveCatalogFeedListFragmentwhich has the buttons for the different catalogs,CatalogFragmentwhich has the contents of a specific catalog, andPublicationDetailFragmentwhich serves as the detail screen for a specific publication