@@ -39,7 +39,7 @@
-
+
{{ $strings.MessageNoEpisodes }}
@@ -80,7 +80,7 @@ export default {
episodeComponentRefs: {},
windowHeight: 0,
episodesTableOffsetTop: 0,
- episodeRowHeight: 176,
+ episodeRowHeight: 44 * 4, // h-44,
currScrollTop: 0
}
},
@@ -538,9 +538,10 @@ export default {
this.episodesTableOffsetTop = (lazyEpisodesTableEl?.offsetTop || 0) + 64
this.windowHeight = window.innerHeight
- this.episodesPerPage = Math.ceil(this.windowHeight / this.episodeRowHeight)
this.$nextTick(() => {
+ this.recalcEpisodeRowHeight()
+ this.episodesPerPage = Math.ceil(this.windowHeight / this.episodeRowHeight)
// Maybe update currScrollTop if items were removed
const itemPageWrapper = document.getElementById('item-page-wrapper')
const { scrollHeight, clientHeight } = itemPageWrapper
@@ -548,6 +549,13 @@ export default {
this.currScrollTop = Math.min(this.currScrollTop, maxScrollTop)
this.handleScroll()
})
+ },
+ recalcEpisodeRowHeight() {
+ const episodeRowEl = document.getElementById('episode-0') || document.getElementById('no-episodes')
+ if (episodeRowEl) {
+ const height = getComputedStyle(episodeRowEl).height
+ this.episodeRowHeight = parseInt(height) || this.episodeRowHeight
+ }
}
},
mounted() {