Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ export default defineComponent({
nextTick(() => this.scrollToCurrentVideo())
}
},
playlistId: function (newVal, oldVal) {
if (oldVal !== newVal) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this conditional...

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't want to refetch the playlist if the id is the same

Copy link
Member

Choose a reason for hiding this comment

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

It's called when value not updated too? (It's inside watch)

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 not sure, we definitely set the property every time the video changes, but i'm not sure if watch is triggered on every set or just when the value changes. We have this pattern inside watches in a few places which made me think it might get triggered for every set but i'm not sure.

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 can always remove the check later, if we find out that it's redundant.

if (!process.env.IS_ELECTRON || this.backendPreference === 'invidious') {
this.getPlaylistInformationInvidious()
} else {
this.getPlaylistInformationLocal()
}
}
}
},
mounted: function () {
const cachedPlaylist = this.$store.getters.getCachedPlaylist
Expand Down