From 6f4876e32b8793032e9b2d3305e5186d6a9c79bd Mon Sep 17 00:00:00 2001
From: Trent Larson
Date: Fri, 26 Apr 2024 17:05:11 -0600
Subject: [PATCH] fix problem with duplicates in feed, plus some other UI
tweaks
---
src/views/HomeView.vue | 14 ++++++++++----
src/views/ProjectViewView.vue | 14 ++++++--------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index 652902b68..32ff77531 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -85,7 +85,7 @@
Create An Identifier
@@ -201,7 +201,7 @@
:key="record.jwtId"
>
You've already seen all the following
@@ -491,7 +491,10 @@ export default class HomeView extends Vue {
* @param payload is the flag from the InfiniteScroll indicating if it should load
**/
public async loadMoreGives(payload: boolean) {
- if (payload) {
+ // Since feed now loads projects along the way, it takes longer
+ // and the InfiniteScroll component triggers a load before finished.
+ // One alternative is to totally separate the project link loading.
+ if (payload && !this.isFeedLoading) {
this.updateAllFeed();
}
}
@@ -529,6 +532,9 @@ export default class HomeView extends Vue {
// recipient.did is for legacy data, before March 2023
const recipientDid =
claim.recipient?.identifier || (claim.recipient as any)?.did; // eslint-disable-line @typescript-eslint/no-explicit-any
+
+ // This has indeed proven problematic. See loadMoreGives
+ // We should display it immediately and then get the plan later.
const plan = await getPlanFromCache(
record.fulfillsPlanHandleId,
identity,
@@ -618,7 +624,7 @@ export default class HomeView extends Vue {
const beforeQuery = beforeId == null ? "" : "&beforeId=" + beforeId;
const response = await fetch(
endorserApiServer +
- "/api/v2/report/gives?giftNotTrade=true&" +
+ "/api/v2/report/gives?giftNotTrade=true" +
beforeQuery,
{
method: "GET",
diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue
index d4597ec1e..962522c7a 100644
--- a/src/views/ProjectViewView.vue
+++ b/src/views/ProjectViewView.vue
@@ -5,7 +5,7 @@
-