Skip to content

Commit

Permalink
Fix limit and left (#1349)
Browse files Browse the repository at this point in the history
* Fix limit and left

* Fix lint issue
  • Loading branch information
hadia committed Aug 6, 2021
1 parent 6c9dba9 commit c29e3ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ class BackingAddOnViewHolder(private val binding: ItemAddOnPledgeBinding, privat
.compose(bindToLifecycle())
.compose(Transformers.observeForUI())
.subscribe {
binding.addonTimeLeft.setAddOnTagText(this.ksString.format(context().getString(R.string.limit_limit_per_backer), "limit_per_backer", it))
binding.addonBackerLimit.setAddOnTagText(this.ksString.format(context().getString(R.string.limit_limit_per_backer), "limit_per_backer", it))
}

this.viewModel.outputs.remainingQuantity()
.compose(bindToLifecycle())
.compose(Transformers.observeForUI())
.subscribe {
binding.addonTimeLeft.setAddOnTagText(
binding.addonQuantityRemaining.setAddOnTagText(
this.ksString.format(context().getString(R.string.rewards_info_time_left), "time", it)
)
}
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/layout/item_add_on_pledge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
android:layout_marginEnd="@dimen/grid_1"
android:textColor="@color/kds_support_400"
android:visibility="gone"
app:add_on_tag_text="3 days left"
tools:visibility="visible" />

<com.kickstarter.ui.views.AddOnTagComponent
Expand All @@ -140,7 +139,6 @@
android:layout_marginEnd="@dimen/grid_1"
android:textColor="@color/kds_support_400"
android:visibility="gone"
app:add_on_tag_text="30 left"
tools:visibility="visible" />

<com.kickstarter.ui.views.AddOnTagComponent
Expand All @@ -150,7 +148,6 @@
android:layout_marginEnd="@dimen/grid_1"
android:textColor="@color/kds_support_400"
android:visibility="gone"
app:add_on_tag_text="Limit 4"
tools:visibility="visible" />
</LinearLayout>

Expand Down

0 comments on commit c29e3ed

Please sign in to comment.