Skip to content

Commit

Permalink
Remove USD references on UI
Browse files Browse the repository at this point in the history
  • Loading branch information
kekkyojin committed Oct 15, 2021
1 parent 762b13b commit e04d2e9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/odysee/app/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3225,7 +3225,7 @@ public void onSuccess(List<Reward> rewards) {
Lbryio.updateRewardsLists(rewards);

if (Lbryio.totalUnclaimedRewardAmount > 0) {
updateRewardsUsdVale();
updateRewardsUsdValue();
}
}

Expand All @@ -3236,7 +3236,7 @@ public void onError(Exception error) {
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}

public void updateRewardsUsdVale() {
public void updateRewardsUsdValue() {
if (Lbryio.totalUnclaimedRewardAmount > 0) {
double usdRewardAmount = Lbryio.totalUnclaimedRewardAmount * Lbryio.LBCUSDRate;
}
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/odysee/app/model/Claim.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ public boolean isFree() {
return fee == null || Helper.parseDouble(fee.getAmount(), 0) == 0;
}

/**
* Calculates price of claim in LBC once it is converted from USD
* @param usdRate LBC/USD rate
* @return
*/
public BigDecimal getActualCost(double usdRate) {
if (!(value instanceof StreamMetadata)) {
return new BigDecimal(0);
Expand Down
17 changes: 6 additions & 11 deletions app/src/main/res/layout/card_wallet_balance.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:lbry="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:elevation="4dp">
<LinearLayout
android:orientation="vertical"
Expand All @@ -29,7 +29,9 @@
android:layout_height="wrap_content"
android:fontFamily="@font/inter"
android:textSize="16sp"
android:textFontWeight="300" />
android:textFontWeight="300"
android:visibility="gone"
tools:visibility="visible"/>

<TextView
android:id="@+id/total_balance_desc"
Expand All @@ -40,17 +42,10 @@
android:textFontWeight="300"
android:textSize="@dimen/wallet_detail_balance_desc_font_size" />

<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:background="@color/lightDivider" />


<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal">
<com.odysee.app.views.CreditsBalanceView
android:id="@+id/wallet_spendable_balance"
Expand Down

0 comments on commit e04d2e9

Please sign in to comment.