From 72537c3e62524efed587c2af7781b4cb3f418ae5 Mon Sep 17 00:00:00 2001 From: jlplks Date: Tue, 10 Dec 2024 11:54:36 -0700 Subject: [PATCH] - Added isPledgeOverTimeAllowed to graphql layer (#2188) Added isPledgeOverTimeAllowed to fullProject and projectCard on fragments.graphql and to the respective GraphQLTransformers --- app/src/main/graphql/fragments.graphql | 2 ++ .../kickstarter/services/transformers/GraphQLTransformers.kt | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/app/src/main/graphql/fragments.graphql b/app/src/main/graphql/fragments.graphql index 8ddc7ae342..408c8642e5 100644 --- a/app/src/main/graphql/fragments.graphql +++ b/app/src/main/graphql/fragments.graphql @@ -3,6 +3,7 @@ fragment projectCard on Project { backersCount description isLaunched + isPledgeOverTimeAllowed backing { id } @@ -56,6 +57,7 @@ fragment fullProject on Project { description minPledge isLaunched + isPledgeOverTimeAllowed sendMetaCapiEvents sendThirdPartyEvents backing { diff --git a/app/src/main/java/com/kickstarter/services/transformers/GraphQLTransformers.kt b/app/src/main/java/com/kickstarter/services/transformers/GraphQLTransformers.kt index aa401d2a5e..c8b048201b 100644 --- a/app/src/main/java/com/kickstarter/services/transformers/GraphQLTransformers.kt +++ b/app/src/main/java/com/kickstarter/services/transformers/GraphQLTransformers.kt @@ -305,6 +305,7 @@ fun projectTransformer(projectFragment: FullProject?): Project { val goal = projectFragment?.goal?.amount?.amount?.toDouble() ?: 0.0 val id = decodeRelayId(projectFragment?.id) ?: -1 val isBacking = projectFragment?.backing?.backing?.let { true } ?: false + val isPledgeOverTimeAllowed = projectFragment?.isPledgeOverTimeAllowed ?: false val isStarred = projectFragment?.isWatched ?: false val launchedAt = projectFragment?.launchedAt val location = locationTransformer(projectFragment?.location?.location) @@ -403,6 +404,7 @@ fun projectTransformer(projectFragment: FullProject?): Project { .goal(goal) .id(id) .isBacking(isBacking) + .isPledgeOverTimeAllowed(isPledgeOverTimeAllowed) .isStarred(isStarred) .lastUpdatePublishedAt(updatedAt) .launchedAt(launchedAt) @@ -560,6 +562,7 @@ fun projectTransformer(projectFragment: ProjectCard?): Project { val goal = projectFragment?.goal?.amount?.amount?.toDouble() ?: 0.0 val id = decodeRelayId(projectFragment?.id) ?: -1 val isBacking = projectFragment?.backing?.id?.let { true } ?: false + val isPledgeOverTimeAllowed = projectFragment?.isPledgeOverTimeAllowed ?: false val isStarred = projectFragment?.isWatched ?: false val launchedAt = projectFragment?.launchedAt val location = locationTransformer(projectFragment?.location?.location) @@ -596,6 +599,7 @@ fun projectTransformer(projectFragment: ProjectCard?): Project { .goal(goal) .id(id) .isBacking(isBacking) + .isPledgeOverTimeAllowed(isPledgeOverTimeAllowed) .isStarred(isStarred) .launchedAt(launchedAt) .location(location)