Skip to content

Commit

Permalink
Fix issue with importing playlists and fix issue with video bar being…
Browse files Browse the repository at this point in the history
… incorrect in playlists view
  • Loading branch information
PrestonN committed Feb 6, 2022
1 parent 7c6f3d2 commit f69c535
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/renderer/components/data-settings/data-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ export default Vue.extend({
playlistData.videos.forEach((video) => {
let hasAllKeys = true
Object.keys(video).forEach((videoKey) => {
if (!requiredVideoKeys.includes(videoKey)) {
if (!Object.keys(video).includes(videoKey)) {
hasAllKeys = false
}
})
Expand Down
21 changes: 11 additions & 10 deletions src/renderer/views/UserPlaylists/UserPlaylists.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@ export default Vue.extend({
}
},
watch: {
// This implementation of loading effect
// causes "scroll to top" side effect which is reported as a bug
// https://github.com/FreeTubeApp/FreeTube/issues/1507
//
// activeData() {
// this.isLoading = true
// setTimeout(() => {
// this.isLoading = false
// }, 100)
// }
activeData() {
const scrollPos = window.scrollY || window.scrollTop || document.getElementsByTagName('html')[0].scrollTop
this.isLoading = true
setTimeout(() => {
this.isLoading = false
// This is kinda ugly, but should fix a few existing issues
setTimeout(() => {
window.scrollTo(0, scrollPos)
}, 100)
}, 100)
}
},
mounted: function () {
const limit = sessionStorage.getItem('favoritesLimit')
Expand Down

0 comments on commit f69c535

Please sign in to comment.