1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-02-12 04:43:44 +00:00

User pages now count for quota, as it should be.

This commit is contained in:
Cadence Ember
2022-05-06 16:05:37 +12:00
parent 5a1b0e88b2
commit 7acb21f613
4 changed files with 23 additions and 5 deletions

View File

@@ -79,8 +79,12 @@ class NextPage extends FreezeWidth {
this.freeze(this.element.getAttribute("data-loading-text"))
const type = this.element.getAttribute("data-type")
return fetch(`/fragment/user/${this.element.getAttribute("data-username")}/${this.nextPageNumber}?type=${type}`).then(res => res.text()).then(text => {
quota.change(-1)
return fetch(`/fragment/user/${this.element.getAttribute("data-username")}/${this.nextPageNumber}?type=${type}`).then(res => {
if (res.status === 200) {
quota.change(-1)
}
return res.text()
}).then(text => {
q("#next-page-container").remove()
this.observer.disconnect()
q("#timeline").insertAdjacentHTML("beforeend", text)