fix a bug where the innerHTML did not reset on reload.

This commit is contained in:
CatAClock 2025-05-11 16:14:40 -07:00
parent 6a6d4f9c3f
commit bd6ad4a0aa

View file

@ -188,7 +188,9 @@ async function PosterContainerUpdate(Direction) {
switch(countergroup) {
// Mastodon
case 0:
// Begin by having the website we are using get pushed to the expanded view array and clean out the HTML.
WebsiteAPIType.push("Mastodon");
i.getElementsByClassName("PostContent")[0].innerHTML = "";
if (MastodonLoadedFeed[CurrentThing + counter] == undefined) {
let TempFeed = await MastodonAPI.GetTimeline(MastodonLoadedFeed[CurrentThing + counter - 1].id);
MastodonLoadedFeed = MastodonLoadedFeed.concat(TempFeed);
@ -214,7 +216,9 @@ async function PosterContainerUpdate(Direction) {
break;
// Bsky
case 1:
// Begin by having the website we are using get pushed to the expanded view array and clean out the HTML.
WebsiteAPIType.push("Bluesky");
i.getElementsByClassName("PostContent")[0].innerHTML = "";
if (BlueskyLoadedFeed[CurrentThing + counter] == undefined) {
let TempFeed = await BlueskyAPI.GetTimeline(BlueskyLoadedFeed[CurrentThing + counter - 1].post.indexedAt).then((response) => response.feed)
BlueskyLoadedFeed = BlueskyLoadedFeed.concat(TempFeed);