Skip to content

Commit

Permalink
fix displaying selected tab, get best quality image
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkyProgrammer committed Mar 3, 2023
1 parent f30a817 commit baf282a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,12 @@ export default Vue.extend({
},

getBestQualityImage(imageArray) {
return imageArray.at(-1)?.url ?? ''
const imageArrayCopy = Array.from(imageArray)
imageArrayCopy.sort((a, b) => {
return Number.parseInt(b.width) - Number.parseInt(a.width)
})

return imageArrayCopy.at(0)?.url ?? ''
}
}
})
3 changes: 1 addition & 2 deletions src/renderer/views/Channel/Channel.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@
border-bottom: 3px solid var(--tertiary-text-color);
}

.selectedTab:focus,
.selectedTab:hover {
.selectedTab {
color: var(--primary-text-color);
border-bottom: 3px solid var(--primary-color);
font-weight: bold;
Expand Down

0 comments on commit baf282a

Please sign in to comment.