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

Fix Hide Channel Subscribers setting still displaying subscribers if changed from a secondary window (#3504) #3692

Merged
merged 4 commits into from
Jun 25, 2023

Conversation

Rikthepixel
Copy link
Contributor

Fix Hide Channel Subscribers setting still displaying subscribers if changed from a secondary window (#3504)

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

closes #3504

Description

I fixed this issue in 3 components:

  1. ft-list-channel
  2. watch-video-info
  3. Channel

Because hideChannelSubscriptions is state that can be updated, the places where this was implemented did not seem to take that into account.

For example, in the Channel.js the getChannelLocal only gets called when the component is mounted. In that method they are setting the this.subCount state to null if hideChannelSubscriptions is false. Normally this would not be an issue because the component would be remounted if you go back and forth between pages, but because we have two windows open that means the this.subCount value will always stay null.

There may be some other "distraction free settings" that have the same issues. Although unless someone uses two windows simultaneously it should be barely an issue.

Screenshots

(Example channel page)

Before:

before

After:

afbeelding

Testing

I hand tested this issue by switching the Hide Channel Subscribers on/off.

Desktop

  • OS: Windows 11
  • OS Version: 22H2
  • FreeTube version: Release 0.18.0 Beta

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 22, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 22, 2023 13:47
auto-merge was automatically disabled June 22, 2023 18:21

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 22, 2023 18:21
@Rikthepixel Rikthepixel requested a review from PikachuEXE June 22, 2023 20:21
PikachuEXE
PikachuEXE previously approved these changes Jun 23, 2023
Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally

auto-merge was automatically disabled June 25, 2023 11:07

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot merged commit 96835dd into FreeTubeApp:development Jun 25, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 25, 2023
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.

[Bug]: Subsciber count not hidden in subscribe button on video page when Hide Channel Subscribers is enabled
5 participants