From 128d062e48e1a39b5625887c364bd71a376344cd Mon Sep 17 00:00:00 2001 From: Akhilesh Thite Date: Wed, 20 Mar 2024 02:35:35 +0530 Subject: [PATCH] fix: pagination controls by ensuring activation post outbox URL update in actor-profile --- actor-profile.js | 1 + outbox.js | 2 +- profile.html | 20 +++++++++++--------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/actor-profile.js b/actor-profile.js index 79017f2..2ef8ad4 100644 --- a/actor-profile.js +++ b/actor-profile.js @@ -84,6 +84,7 @@ class ActorProfile extends HTMLElement { "url", actorInfo.outbox ); + this.dispatchEvent(new CustomEvent('outboxUpdated', { bubbles: true })); } } diff --git a/outbox.js b/outbox.js index c0e05f0..80f04cf 100644 --- a/outbox.js +++ b/outbox.js @@ -2,7 +2,7 @@ class DistributedOutbox extends HTMLElement { constructor() { super(); this.renderedItems = new Map(); // Tracks rendered items by ID - this.numPosts = 32; // Default value + this.numPosts = 1; // Default value this.page = 1; // Default value this.totalPages = 0; // Keep track of total pages } diff --git a/profile.html b/profile.html index fb01839..d081439 100644 --- a/profile.html +++ b/profile.html @@ -14,16 +14,18 @@