Skip to content
Snippets Groups Projects
Commit ecc3ed3a authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch 'broken-favorites' into 'develop'

Fixed broken pagination on favorites

See merge request funkwhale/funkwhale!1046
parents 3f837189 b687e688
No related branches found
No related tags found
No related merge requests found
......@@ -92,18 +92,12 @@ export default {
Pagination
},
data() {
let defaultOrdering = this.getOrderingFromString(
this.defaultOrdering || "-creation_date"
)
return {
results: null,
isLoading: false,
nextLink: null,
previousLink: null,
page: parseInt(this.defaultPage),
paginateBy: parseInt(this.defaultPaginateBy || 25),
orderingDirection: defaultOrdering.direction || "+",
ordering: defaultOrdering.field,
orderingOptions: [
["creation_date", "creation_date"],
["title", "track_title"],
......@@ -117,6 +111,7 @@ export default {
this.$router.push({name: 'login', query: {next: this.$router.currentRoute.fullPath}})
}
this.fetchFavorites(FAVORITES_URL)
},
mounted() {
$(".ui.dropdown").dropdown()
......@@ -140,6 +135,7 @@ export default {
ordering: this.getOrderingAsString()
}
})
this.fetchFavorites(FAVORITES_URL)
},
fetchFavorites(url) {
var self = this
......
......@@ -87,6 +87,11 @@ export default {
orderingDirection: "-",
ordering: "creation_date",
},
"favorites": {
paginateBy: 50,
orderingDirection: "-",
ordering: "creation_date",
},
},
serviceWorker: {
refreshing: false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment