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

Fixing issue with visibleDataList holding onto stale data #2601

Conversation

MarmadileManteater
Copy link
Contributor


Fixing issue with visibleDataList holding onto stale data

Pull Request Type
Please select what type of pull request this is:

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Description
This PR intends to fix an unintentional bug introduced by #2567.

When selecting an invidious instance in the settings, the dropdown which displays possible instances will only update when the view is mounted. The result is that you can not get the dropdown to populate with invidious instances other than the current instance at the time the view was mounted:
before-change

The core issue is that the call to updateVisibleDataList was moved out of handleInput and into the watch method for dataList; however, there was no watch method added inputData, This means that visibleDataList sometimes retains stale data when it should be updating. This PR aims to resolve this by adding updateVisibleDataList to a watch method for inputData.

Screenshots
after-change

Testing (for code that is not small enough to be easily understandable)
I have tested the search suggestions and the invidious instance selector, but there may be other relevant ft-inputs to test.

Desktop (please complete the following information):

  • OS: Windows 10
  • OS Version: Pro Version 21H2 Installed on ‎4/‎3/‎2022 OS build 19044.1889 Experience Windows Feature Experience Pack 120.2212.4180.0
  • FreeTube version: 0.17.1

@ChunkyProgrammer
Copy link
Member

Good catch

@ChunkyProgrammer ChunkyProgrammer added the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 21, 2022
@PrestonN PrestonN merged commit b722435 into FreeTubeApp:development Sep 21, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 21, 2022
@MarmadileManteater MarmadileManteater deleted the invidious-instances-list-fix branch October 6, 2022 14:52
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.

None yet

5 participants