Skip to content

Commit

Permalink
feat: dynamically assign buffer height
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Jun 23, 2021
1 parent 91b064f commit 3dfb658
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:items="getPosts"
:min-item-size="1000"
:page-mode="true"
:buffer="3000"
:buffer="dynamicBufferHeight"
class="flex-auto"
>
<template v-slot="{ item, index, active }">
Expand Down Expand Up @@ -51,7 +51,11 @@ export default {
mixins: [UrlManagerMixin],
computed: {
...mapGetters('booru', ['getPosts']),
...mapGetters('booru', ['getPosts', 'getActiveBooru']),
dynamicBufferHeight() {
return window.screen.availHeight * 1.5
},
},
}
</script>

0 comments on commit 3dfb658

Please sign in to comment.