Improve the switch statement at the feed filter

This commit is contained in:
Bnyro 2023-01-27 19:05:02 +01:00
parent 981ac46bec
commit 9e97fc732b

View file

@ -99,13 +99,13 @@ export default {
}
},
shouldShowVideo(video) {
switch (this.selectedFilter) {
case "all":
return true;
switch (this.selectedFilter.toLowerCase()) {
case "shorts":
return video.isShort;
case "videos":
return !video.isShort;
default:
return video.isShort;
return true;
}
},
onFilterChange() {