Skip to content

Conversation

@ChunkyProgrammer
Copy link
Member

@ChunkyProgrammer ChunkyProgrammer commented Aug 15, 2023

Fix Update Subscription Details function when channel name is null

Pull Request Type

  • Bugfix

Related issue

closes #3869

Description

Fixes some issues for when a channel's name is null as well as simplifies the sorting we do on channels and centralizes the deepCopy function

Testing

  • Back up subscriptions!!!
  • Edit a channel in profiles.db and remove that channel's name (do it for all profiles that the channel is)
  • Load FreeTube
  • The channel appears at the bottom of the side bar and doesn't cause errors

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.18.0

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 15, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 15, 2023 02:10
},
primaryProfile: function () {
return JSON.parse(JSON.stringify(this.profileList[0]))
return deepCopy(this.profileList[0])
Copy link
Member Author

Choose a reason for hiding this comment

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

I updated all references of JSON.parse(JSON.stringify to use deepCopy to make the code more consistent

return 0
}).map((channel) => {
const subscriptions = deepCopy(this.profile.subscriptions).sort((a, b) => {
return a.name?.toLowerCase().localeCompare(b.name?.toLowerCase(), this.locale)
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm conditionally checking the name as there is a chance it is null due to the previous bug

@FreeTubeBot FreeTubeBot merged commit 0cbe02f into FreeTubeApp:development Aug 15, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 15, 2023
@ChunkyProgrammer ChunkyProgrammer deleted the use-option-chaining-for-sort branch August 15, 2023 19:17
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 21, 2023
* development:
  Translated using Weblate (Greek)
  Fix locales getting unnecessarily reprocessed for incremental builds (FreeTubeApp#3893)
  Fix the layout of the hashtag page (FreeTubeApp#3886)
  Translated using Weblate (French)
  Translated using Weblate (Swedish)
  Translated using Weblate (Indonesian)
  Translated using Weblate (Italian)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Italian)
  Translated using Weblate (Portuguese)
  Cleanup some template conditionals (FreeTubeApp#3888)
  Add semantic roles to make the site more accessible (FreeTubeApp#3887)
  Translated using Weblate (Japanese)
  Fix Update Subscription Details function when channel name is null (FreeTubeApp#3884)
  Translated using Weblate (Spanish)
  Translated using Weblate (Romanian)
  Translated using Weblate (Hebrew)
  local API: Add support for PageHeader channel header (FreeTubeApp#3871)
  Translated using Weblate (Chinese (Traditional))

# Conflicts:
#	src/renderer/components/ft-list-playlist/ft-list-playlist.vue
#	src/renderer/components/ft-list-video/ft-list-video.vue
#	src/renderer/views/UserPlaylists/UserPlaylists.vue
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 21, 2023
* feature/playlist-2023-05:
  Translated using Weblate (Greek)
  Fix locales getting unnecessarily reprocessed for incremental builds (FreeTubeApp#3893)
  Fix the layout of the hashtag page (FreeTubeApp#3886)
  Translated using Weblate (French)
  Translated using Weblate (Swedish)
  Translated using Weblate (Indonesian)
  Translated using Weblate (Italian)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Italian)
  Translated using Weblate (Portuguese)
  Cleanup some template conditionals (FreeTubeApp#3888)
  Add semantic roles to make the site more accessible (FreeTubeApp#3887)
  Translated using Weblate (Japanese)
  Fix Update Subscription Details function when channel name is null (FreeTubeApp#3884)
  Translated using Weblate (Spanish)
  Translated using Weblate (Romanian)
  Translated using Weblate (Hebrew)
  local API: Add support for PageHeader channel header (FreeTubeApp#3871)
  ! Fix invalid prop type warning
  Translated using Weblate (Chinese (Traditional))
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]: Side Bar dont show what should i do?

5 participants