Fix issue #1030 #1031

Merged
ycohen-dev merged 1 commit from fix_issue_1030 into master 2020-10-14 16:12:35 +02:00
ycohen-dev commented 2020-10-13 22:22:53 +02:00 (Migrated from github.com)

Dismiss all active dialog fragment when entering PiP mode
So that PiP window contain the video only

PR Checklist

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Fixes

Issue Number: 1030

What is the current behavior?

Support/Repost dialogs interfere with video displayed in PiP mode

What is the new behavior?

When entering PiP mode - any unfinished dialogs are dismissed,
leaving the PiP clean of any unrelated artifacts

Other information

Dismiss all active dialog fragment when entering PiP mode So that PiP window contain the video only ## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [x] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below ## PR Type What kind of change does this PR introduce? - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: ## Fixes Issue Number: 1030 ## What is the current behavior? Support/Repost dialogs interfere with video displayed in PiP mode ## What is the new behavior? When entering PiP mode - any unfinished dialogs are dismissed, leaving the PiP clean of any unrelated artifacts ## Other information <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. -->
ycohen-dev commented 2020-10-13 22:38:17 +02:00 (Migrated from github.com)

In order to plan ahead and close any current and future dialogs that can be opened
from fileViewFragment - I'm scanning the fragment manager of the main activity - looking for instances of DialogFragment.
If I find any - I dismiss them.

Alternatively, I could have gone with implementing PIPModeListener in RepostClaimDialogFragment and CreateSupportDialogFragment - dismissing themselves on PiP enter , and doing nothing on return from PiP,
While registering/deregistering them on OnStart and OnStop
I don't think this solution scale well , and it will lead to code duplication.

In order to plan ahead and close any current and future dialogs that can be opened from fileViewFragment - I'm scanning the fragment manager of the main activity - looking for instances of DialogFragment. If I find any - I dismiss them. Alternatively, I could have gone with implementing PIPModeListener in RepostClaimDialogFragment and CreateSupportDialogFragment - dismissing themselves on PiP enter , and doing nothing on return from PiP, While registering/deregistering them on OnStart and OnStop I don't think this solution scale well , and it will lead to code duplication.
akinwale (Migrated from github.com) approved these changes 2020-10-14 16:12:10 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#1031
No description provided.