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

Decouple available user actions from video resources #748

Open
mathebox opened this issue Mar 2, 2020 · 0 comments
Open

Decouple available user actions from video resources #748

mathebox opened this issue Mar 2, 2020 · 0 comments

Comments

@mathebox
Copy link
Member

mathebox commented Mar 2, 2020

Is your feature request related to a problem? Please describe.
Additional user actions (like managing downloads) are currently only available for video items. Because of this, we check the type of the item’s content (item.content as? Video) throughout the codebase. When introducing new user actions on other resources, we would have to add additional checks in each section of the code. This indicates an insufficient level of abstraction. Therefore, we should decouple the user actions from video resources.

Describe the solution you'd like
Move logic to an extension of the superclass Content. Each content resource (subclass) can provide the available user actions on its own. Maybe use a separate protocol for this.

Affected Component
Content, Video+UserActions, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant