Skip to content

Commit

Permalink
Remove "Update Pledge" option on Manage Your Pledge menu (#2180)
Browse files Browse the repository at this point in the history
* Created plot selected menu for ProjectPageViewModel

* added     isPledgeOverTimeAllowed to project

* Added incremental to Backing object, Created a project with plot selected on ProjectFactory, added test

* fix ktlint

---------

Co-authored-by: Isabel Martin <arkariang@gmail.com>
  • Loading branch information
jlplks and Arkariang authored Dec 4, 2024
1 parent 2b898d9 commit ee65993
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ object ProjectFactory {
.backerId(IdFactory.id().toLong())
.cancelable(true)
.id(IdFactory.id().toLong())
.incremental(true)
.sequence(1)
.reward(reward)
.rewardId(reward.id())
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/com/kickstarter/models/Backing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Backing private constructor(
private val completedAt: DateTime?,
private val completedByBacker: Boolean,
private val id: Long,
private val incremental: Boolean?,
private val location: Location?,
private val locationId: Long?,
private val locationName: String?,
Expand Down Expand Up @@ -47,6 +48,7 @@ class Backing private constructor(
fun completedAt() = this.completedAt
fun completedByBacker() = this.completedByBacker
override fun id() = this.id
fun incremental() = this.incremental
fun location() = this.location
fun locationId() = this.locationId
fun locationName() = this.locationName
Expand Down Expand Up @@ -77,6 +79,7 @@ class Backing private constructor(
private var completedAt: DateTime? = null,
private var completedByBacker: Boolean = false,
private var id: Long = 0L,
private var incremental: Boolean? = null,
private var location: Location? = null,
private var locationId: Long? = null,
private var locationName: String? = null,
Expand Down Expand Up @@ -105,6 +108,7 @@ class Backing private constructor(
fun completedAt(completedAt: DateTime?) = apply { this.completedAt = completedAt }
fun completedByBacker(completedByBacker: Boolean?) = apply { this.completedByBacker = completedByBacker ?: false }
fun id(id: Long?) = apply { this.id = id ?: 0L }
fun incremental(incremental: Boolean?) = apply { this.incremental = incremental }
fun location(location: Location?) = apply { this.location = location }
fun locationId(locationId: Long?) = apply { this.locationId = locationId }
fun locationName(locationName: String?) = apply { this.locationName = locationName }
Expand Down Expand Up @@ -132,6 +136,7 @@ class Backing private constructor(
completedAt = completedAt,
completedByBacker = completedByBacker,
id = id,
incremental = incremental,
location = location,
locationId = locationId,
locationName = locationName,
Expand Down Expand Up @@ -162,6 +167,7 @@ class Backing private constructor(
completedAt = completedAt,
completedByBacker = completedByBacker,
id = id,
incremental = incremental,
location = location,
locationId = locationId,
locationName = locationName,
Expand All @@ -183,6 +189,7 @@ class Backing private constructor(
var equals = super.equals(other)
if (other is Backing) {
equals = id() == other.id() &&
incremental() == other.incremental() &&
amount() == other.amount() &&
backer() == other.backer() &&
backerNote() == other.backerNote() &&
Expand Down
Loading

0 comments on commit ee65993

Please sign in to comment.