Skip to content

Commit

Permalink
fix: listOrdering not initialized properly
Browse files Browse the repository at this point in the history
Signed-off-by: Wolfgang <[email protected]>
  • Loading branch information
wofferl authored and SMillerDev committed Oct 30, 2024
1 parent 2ad0dcd commit 5ed9341
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/feed-display/FeedItemDisplayList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export default Vue.extend({
filteredItemcache: [] as FeedItem,
selectedItem: undefined as FeedItem | undefined,
debouncedClickItem: null,
listOrdering: this.getListOrdering(),
}
},
computed: {
Expand Down Expand Up @@ -207,7 +208,6 @@ export default Vue.extend({
},
},
created() {
this.listOrdering = this.getListOrdering()
this.loadFilter()
},
mounted() {
Expand All @@ -221,10 +221,10 @@ export default Vue.extend({
}
},
getListOrdering(): boolean {
// all routes expect feeds use global ordering
if (!this.fetchKey.startsWith('feed-')) {
return this.$store.getters.oldestFirst
}
// this.config.ordering is only defined in feed route
let oldestFirst
switch (this.$store.state.feeds.ordering[this.fetchKey]) {
case FEED_ORDER.OLDEST:
Expand Down Expand Up @@ -336,7 +336,6 @@ export default Vue.extend({
if (this.$store.state.items.lastItemLoaded[this.fetchKey] > 0) {
response = response.filter(this.outOfScopeFilter)
}
return response.sort(this.sort)
},
// debounce clicks to prevent multiple api calls when on the end of the actual loaded list
Expand Down

0 comments on commit 5ed9341

Please sign in to comment.