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

refactor: Restructure ViewMediaActivity and related fragments #489

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

nikclayton
Copy link
Contributor

Highlights:

  • Implement fragment transitions for video to improve the UX, video won't start playing until the transition completes
  • Remove rxJava
  • Move duplicate code in to base classes

Details:

MediaActionsListener:

  • Move to ViewMediaFragment as it's used by both subclasses
  • Remove need for separate VideoActionsListener
  • Rename methods to better reflect their purpose and improve readability

ViewMediaFragment:

  • Move duplicated code from ViewImageFragment and ViewVideoFragment
  • Rewrite code that handles fragment transitions to use a CompleteableDeferred instead of BehaviorSubject (removes rxJava).
  • Rename methods and properties to better reflect their purpose and improve readability
  • Add extra comments

ViewImageFragment:

  • Rewrite code that handles fragment transitions to use a CompleteableDeferred instead of BehaviorSubject (removes rxJava).

ViewVideoFragment:

  • Implement fragment transitions for video to improve the UX, video won't start playing until the transition completes
  • Manage toolbar visibility with a coroutine instead of a handler
  • Add extra comments

ViewMediaActivity:

  • Rename properties to better reflect their purpose and improve readability
  • Add extra comments

ImagePagerAdapter:

  • Rename properties to better reflect their purpose and improve readability
  • Add extra comments

Highlights:

- Implement fragment transitions for video to improve the UX, video
  won't start playing until the transition completes
- Remove rxJava
- Move duplicate code in to base classes

Details:

`MediaActionsListener`:

- Move to `ViewMediaFragment` as it's used by both subclasses
- Remove need for separate `VideoActionsListener`
- Rename methods to better reflect their purpose and improve readability

`ViewMediaFragment`:

- Move duplicated code from `ViewImageFragment` and `ViewVideoFragment`
- Rewrite code that handles fragment transitions to use a
  `CompleteableDeferred` instead of `BehaviorSubject` (removes rxJava).
- Rename methods and properties to better reflect their purpose and
  improve readability
- Add extra comments

`ViewImageFragment`:
- Rewrite code that handles fragment transitions to use a
  `CompleteableDeferred` instead of `BehaviorSubject` (removes rxJava).

`ViewVideoFragment`:

- Implement fragment transitions for video to improve the UX, video
  won't start playing until the transition completes
- Manage toolbar visibility with a coroutine instead of a handler
- Add extra comments

`ViewMediaActivity`:
- Rename properties to better reflect their purpose and improve readability
- Add extra comments

`ImagePagerAdapter`:
- Rename properties to better reflect their purpose and improve readability
- Add extra comments
@nikclayton nikclayton merged commit 1026fcc into main Mar 3, 2024
6 checks passed
@nikclayton nikclayton deleted the view-media-fix branch March 3, 2024 15:07
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.

1 participant