Add persistent watch time setting. #7547

Merged
Ruk33 merged 8 commits from 7543-settings-option-to-persist-fully-watched-files-for-view-indicator into master 2022-04-22 05:00:57 +02:00
Ruk33 commented 2022-04-18 20:02:51 +02:00 (Migrated from github.com)

Fixes

Issue Number: https://github.com/lbryio/lbry-desktop/issues/7543

What is the current behavior?

When a user watches a video, the progress may be reset/cleared out.

What is the new behavior?

A new setting has been included so the watch progress is never cleared (without affecting any other functionality of the app) By default, this option is turned off.

image

Other information

PR Checklist

Toggle...

What kind of change does this PR introduce?

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

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 added a line describing my change to CHANGELOG.md
  • 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
## Fixes Issue Number: https://github.com/lbryio/lbry-desktop/issues/7543 <!-- Tip: - Add keywords to directly close the Issue when the PR is merged. - Skip the keyword if the Issue contains multiple items. - https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword --> ## What is the current behavior? When a user watches a video, the progress may be reset/cleared out. ## What is the new behavior? A new setting has been included so the watch progress is never cleared (without affecting any other functionality of the app) By default, this option is turned off. ![image](https://user-images.githubusercontent.com/1719111/163852516-08296a83-6c5f-4c57-ae8f-f795b52af451.png) ## Other information <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. --> ## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> <details><summary>Toggle...</summary> What kind of change does this PR introduce? - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: 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) - [ ] I added a line describing my change to CHANGELOG.md - [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 </details>
jessopb (Migrated from github.com) reviewed 2022-04-18 20:02:51 +02:00
jessopb commented 2022-04-20 23:08:48 +02:00 (Migrated from github.com)

Sorry for the delay.
For me, it didn't honor the setting when I closed a floating player that had finished due to a bug. I pushed that small change.

I know we talked about adding another value to the persist data, but I think the better strategy is setting it to null:

// redux/actions/content.js: clearPosition()
    if (shouldPersist) {
      dispatch({
        type: ACTIONS.CLEAR_CONTENT_POSITION,
        data: { claimId, outpoint },
      });
    } else {
      dispatch({
        type: ACTIONS.SET_CONTENT_POSITION,
        data: { claimId, outpoint, position: null },
      });
    }
The code already uses null for position in places.

Also, I think It's good to add the persist default to the settings reducer under clientSettings.

A 'clear all' button in the same setting block would be nice doClearAllPositions or something.
Sorry for the delay. For me, it didn't honor the setting when I closed a floating player that had finished due to a bug. I pushed that small change. I know we talked about adding another value to the persist data, but I think the better strategy is setting it to null: ``` // redux/actions/content.js: clearPosition() if (shouldPersist) { dispatch({ type: ACTIONS.CLEAR_CONTENT_POSITION, data: { claimId, outpoint }, }); } else { dispatch({ type: ACTIONS.SET_CONTENT_POSITION, data: { claimId, outpoint, position: null }, }); } ``` The code already uses null for position in places. Also, I think It's good to add the persist default to the settings reducer under clientSettings. A 'clear all' button in the same setting block would be nice doClearAllPositions or something.
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-desktop#7547
No description provided.