diff --git a/app/build.gradle b/app/build.gradle index 89ae00ea..ccc38f9d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,8 +16,8 @@ android { applicationId "io.lbry.browser" minSdkVersion 21 targetSdkVersion 29 - versionCode 1700 - versionName "0.17.0" + versionCode 1614 + versionName "0.16.14" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -132,8 +132,8 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' - __32bitImplementation 'io.lbry:lbrysdk32:0.91.0' - __64bitImplementation 'io.lbry:lbrysdk64:0.91.0' + __32bitImplementation 'io.lbry:lbrysdk32:0.88.0' + __64bitImplementation 'io.lbry:lbrysdk64:0.88.0' } apply plugin: 'com.google.gms.google-services' diff --git a/app/src/main/java/io/lbry/browser/VerificationActivity.java b/app/src/main/java/io/lbry/browser/VerificationActivity.java index 9a839115..a9489f56 100644 --- a/app/src/main/java/io/lbry/browser/VerificationActivity.java +++ b/app/src/main/java/io/lbry/browser/VerificationActivity.java @@ -204,16 +204,15 @@ public class VerificationActivity extends FragmentActivity implements SignInList } else if (flow == VERIFICATION_FLOW_REWARDS) { User user = Lbryio.currentUser; // disable phone verification for now - if (!user.isIdentityVerified()) { + /*if (!user.isIdentityVerified()) { // phone number verification required viewPager.setCurrentItem(VerificationPagerAdapter.PAGE_VERIFICATION_PHONE, false); flowHandled = true; - } else { - if (!user.isRewardApproved()) { - // manual verification required - viewPager.setCurrentItem(VerificationPagerAdapter.PAGE_VERIFICATION_MANUAL, false); - flowHandled = true; - } + } else */ + if (!user.isRewardApproved()) { + // manual verification required + viewPager.setCurrentItem(VerificationPagerAdapter.PAGE_VERIFICATION_MANUAL, false); + flowHandled = true; } } @@ -226,11 +225,6 @@ public class VerificationActivity extends FragmentActivity implements SignInList } } - public void showPhoneVerification() { - ViewPager2 viewPager = findViewById(R.id.verification_pager); - viewPager.setCurrentItem(VerificationPagerAdapter.PAGE_VERIFICATION_PHONE, false); - } - public void showLoading() { findViewById(R.id.verification_loading_progress).setVisibility(View.VISIBLE); findViewById(R.id.verification_pager).setVisibility(View.INVISIBLE); @@ -244,12 +238,8 @@ public class VerificationActivity extends FragmentActivity implements SignInList @Override public void onBackPressed() { - ViewPager2 viewPager = findViewById(R.id.verification_pager); - - if (viewPager.getCurrentItem() != VerificationPagerAdapter.PAGE_VERIFICATION_MANUAL) - viewPager.setCurrentItem(VerificationPagerAdapter.PAGE_VERIFICATION_MANUAL); - else - super.onBackPressed(); + // ignore back press + return; } public void onEmailAdded(String email) { @@ -306,18 +296,20 @@ public class VerificationActivity extends FragmentActivity implements SignInList ViewPager2 viewPager = findViewById(R.id.verification_pager); // for rewards, (show phone verification if not done, or manual verification if required) if (flow == VERIFICATION_FLOW_REWARDS) { - if (!user.isIdentityVerified()) { + // skipping phone verification + /*if (!user.isIdentityVerified()) { // phone number verification required viewPager.setCurrentItem(VerificationPagerAdapter.PAGE_VERIFICATION_PHONE, false); + } else + */ + if (!user.isRewardApproved()) { + + // manual verification required + viewPager.setCurrentItem(VerificationPagerAdapter.PAGE_VERIFICATION_MANUAL, false); } else { - if (!user.isRewardApproved()) { - // manual verification required - viewPager.setCurrentItem(VerificationPagerAdapter.PAGE_VERIFICATION_MANUAL, false); - } else { - // fully verified - setResult(RESULT_OK); - finish(); - } + // fully verified + setResult(RESULT_OK); + finish(); } } else if (flow == VERIFICATION_FLOW_WALLET) { // for wallet sync, if password unlock is required, show password entry page @@ -355,7 +347,6 @@ public class VerificationActivity extends FragmentActivity implements SignInList return; } - findViewById(R.id.verification_close_button).setVisibility(View.VISIBLE); // show manual verification page if the user is still not reward approved ViewPager2 viewPager = findViewById(R.id.verification_pager); viewPager.setCurrentItem(VerificationPagerAdapter.PAGE_VERIFICATION_MANUAL, false); diff --git a/app/src/main/java/io/lbry/browser/adapter/WalletDetailAdapter.java b/app/src/main/java/io/lbry/browser/adapter/WalletDetailAdapter.java deleted file mode 100644 index 0622d4a1..00000000 --- a/app/src/main/java/io/lbry/browser/adapter/WalletDetailAdapter.java +++ /dev/null @@ -1,100 +0,0 @@ -package io.lbry.browser.adapter; - -import android.content.Context; -import android.content.DialogInterface; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.BaseAdapter; -import android.widget.ImageButton; -import android.widget.ProgressBar; -import android.widget.TextView; - -import androidx.appcompat.app.AlertDialog; - -import java.util.List; - -import io.lbry.browser.MainActivity; -import io.lbry.browser.R; -import io.lbry.browser.model.WalletDetailItem; -import io.lbry.browser.utils.Helper; -import io.lbry.browser.views.CreditsBalanceView; - -public class WalletDetailAdapter extends BaseAdapter { - private final List list; - private final LayoutInflater inflater; - - public WalletDetailAdapter(Context ctx, List rows) { - this.list = rows; - this.inflater = LayoutInflater.from(ctx); - } - @Override - public int getCount() { - return list.size(); - } - - @Override - public Object getItem(int i) { - return list.get(i); - } - - @Override - public long getItemId(int i) { - return i; - } - - @Override - public View getView(int i, View view, ViewGroup viewGroup) { - if (view == null) { - view = inflater.inflate(R.layout.list_item_boosting_balance, viewGroup, false); - - CreditsBalanceView balanceView = view.findViewById(R.id.wallet_supporting_balance); - TextView detailTextView = view.findViewById(R.id.detail); - TextView detailExplanationTextView = view.findViewById(R.id.detail_explanation); - - WalletDetailItem item = (WalletDetailItem) getItem(i); - - detailTextView.setText(item.detail); - detailExplanationTextView.setText(item.detailDesc); - - Helper.setViewText(balanceView, item.detailAmount); - - ProgressBar progressUnlockTips = view.findViewById(R.id.wallet_unlock_tips_progress); - progressUnlockTips.setVisibility(item.isInProgress ? View.VISIBLE : View.GONE); - - ImageButton buttonLock = view.findViewById(R.id.lock_button); - buttonLock.setVisibility((item.isUnlockable && !item.isInProgress) ? View.VISIBLE : View.GONE); - - if (item.isUnlockable) { - buttonLock.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - if (view.getContext() != null) { - AlertDialog.Builder builder = new AlertDialog.Builder(view.getContext()). - setTitle(R.string.unlock_tips). - setMessage(R.string.confirm_unlock_tips) - .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - unlockTips(view); - } - }).setNegativeButton(R.string.no, null); - builder.show(); - } - } - }); - } - } - return view; - } - - private void unlockTips(View v) { - Context ctx = v.getContext(); - if (ctx instanceof MainActivity) { - v.setVisibility(View.GONE); - View progress = v.getRootView().findViewById(R.id.wallet_unlock_tips_progress); - progress.setVisibility(View.VISIBLE); - ((MainActivity) ctx).unlockTips(); - } - } -} diff --git a/app/src/main/java/io/lbry/browser/model/WalletDetailItem.java b/app/src/main/java/io/lbry/browser/model/WalletDetailItem.java deleted file mode 100644 index 571f092a..00000000 --- a/app/src/main/java/io/lbry/browser/model/WalletDetailItem.java +++ /dev/null @@ -1,17 +0,0 @@ -package io.lbry.browser.model; - -public class WalletDetailItem { - public String detail; - public String detailDesc; - public String detailAmount; - public boolean isUnlockable; - public boolean isInProgress; - - public WalletDetailItem(String detail, String detailDesc, String detailAmount, boolean isUnlockable, boolean isInProgress) { - this.detail = detail; - this.detailDesc = detailDesc; - this.detailAmount = detailAmount; - this.isUnlockable = isUnlockable; - this.isInProgress = isInProgress; - } -} diff --git a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java index ecadbc56..3382854c 100644 --- a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java @@ -565,7 +565,7 @@ public class FileViewFragment extends BaseFragment implements webView.setWebViewClient(new LbryWebViewClient(ctx)); WebSettings webSettings = webView.getSettings(); webSettings.setAllowFileAccess(true); - webSettings.setJavaScriptEnabled(false); + webSettings.setJavaScriptEnabled(true); } if (!webViewAdded && root != null) { diff --git a/app/src/main/java/io/lbry/browser/ui/verification/ManualVerificationFragment.java b/app/src/main/java/io/lbry/browser/ui/verification/ManualVerificationFragment.java index cd9a17ca..3dd421ff 100644 --- a/app/src/main/java/io/lbry/browser/ui/verification/ManualVerificationFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/verification/ManualVerificationFragment.java @@ -21,7 +21,6 @@ import com.google.android.material.snackbar.Snackbar; import io.lbry.browser.MainActivity; import io.lbry.browser.R; -import io.lbry.browser.VerificationActivity; import io.lbry.browser.listener.SignInListener; import io.lbry.browser.model.TwitterOauth; import io.lbry.browser.model.lbryinc.RewardVerified; @@ -99,13 +98,6 @@ public class ManualVerificationFragment extends Fragment { } }); - root.findViewById(R.id.verification_manual_phone_number_button).setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - ((VerificationActivity) getContext()).showPhoneVerification(); - } - }); - root.findViewById(R.id.verification_manual_continue_button).setOnClickListener(new View.OnClickListener() { @Override diff --git a/app/src/main/java/io/lbry/browser/ui/wallet/WalletFragment.java b/app/src/main/java/io/lbry/browser/ui/wallet/WalletFragment.java index bf89bae9..69ff7690 100644 --- a/app/src/main/java/io/lbry/browser/ui/wallet/WalletFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/wallet/WalletFragment.java @@ -3,12 +3,12 @@ package io.lbry.browser.ui.wallet; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; +import android.content.DialogInterface; import android.content.SharedPreferences; import android.graphics.Color; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; -import android.transition.TransitionManager; import android.util.Base64; import android.view.GestureDetector; import android.view.LayoutInflater; @@ -16,11 +16,11 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; -import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; import androidx.browser.customtabs.CustomTabsIntent; import androidx.core.content.ContextCompat; import androidx.preference.PreferenceManager; @@ -41,7 +41,6 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; -import java.util.ArrayList; import java.util.List; import java.util.Locale; @@ -51,23 +50,21 @@ import javax.crypto.spec.SecretKeySpec; import io.lbry.browser.MainActivity; import io.lbry.browser.R; import io.lbry.browser.adapter.TransactionListAdapter; -import io.lbry.browser.adapter.WalletDetailAdapter; import io.lbry.browser.listener.SdkStatusListener; import io.lbry.browser.listener.WalletBalanceListener; import io.lbry.browser.model.NavMenuItem; import io.lbry.browser.model.Transaction; import io.lbry.browser.model.WalletBalance; -import io.lbry.browser.model.WalletDetailItem; import io.lbry.browser.tasks.wallet.TransactionListTask; import io.lbry.browser.tasks.wallet.WalletAddressUnusedTask; import io.lbry.browser.tasks.wallet.WalletSendTask; import io.lbry.browser.ui.BaseFragment; +import io.lbry.browser.ui.publish.PublishFragment; import io.lbry.browser.utils.Helper; import io.lbry.browser.utils.Lbry; import io.lbry.browser.utils.LbryAnalytics; import io.lbry.browser.utils.LbryUri; import io.lbry.browser.utils.Lbryio; -import io.lbry.browser.views.CreditsBalanceView; public class WalletFragment extends BaseFragment implements SdkStatusListener, WalletBalanceListener { @@ -78,18 +75,17 @@ public class WalletFragment extends BaseFragment implements SdkStatusListener, W private View layoutAccountRecommended; private View layoutSdkInitializing; private View linkSkipAccount; - private CreditsBalanceView walletTotalBalanceView; - private CreditsBalanceView walletSpendableBalanceView; - private CreditsBalanceView walletSupportingBalanceView; + private TextView textWalletBalance; private TextView textWalletBalanceUSD; - private TextView textWalletBalanceDesc; - private TextView buttonViewMore; - private ListView detailListView; - List detailRows; - private WalletDetailAdapter detailAdapter; - + private TextView textTipsBalance; + private TextView textTipsBalanceUSD; + private TextView textClaimsBalance; + private TextView textSupportsBalance; private ProgressBar walletSendProgress; + private TextView linkUnlockTips; + private ProgressBar progressUnlockTips; + private View loadingRecentContainer; private View inlineBalanceContainer; private TextView textWalletInlineBalance; @@ -99,6 +95,7 @@ public class WalletFragment extends BaseFragment implements SdkStatusListener, W private View linkViewAll; private TextView textConvertCredits; private TextView textConvertCreditsBittrex; + private TextView textEarnMoreTips; private TextView textWhatSyncMeans; private TextView textWalletReceiveAddress; private TextView textWalletHintSyncStatus; @@ -130,14 +127,16 @@ public class WalletFragment extends BaseFragment implements SdkStatusListener, W textWalletInlineBalance = root.findViewById(R.id.wallet_inline_balance_value); walletSendProgress = root.findViewById(R.id.wallet_send_progress); - walletTotalBalanceView = root.findViewById(R.id.wallet_total_balance); - walletSpendableBalanceView = root.findViewById(R.id.wallet_spendable_balance); - walletSupportingBalanceView = root.findViewById(R.id.wallet_supporting_balance); + textWalletBalance = root.findViewById(R.id.wallet_balance_value); textWalletBalanceUSD = root.findViewById(R.id.wallet_balance_usd_value); - textWalletBalanceDesc = root.findViewById(R.id.total_balance_desc); + textTipsBalance = root.findViewById(R.id.wallet_balance_tips); + textTipsBalanceUSD = root.findViewById(R.id.wallet_balance_tips_usd_value); + textClaimsBalance = root.findViewById(R.id.wallet_balance_staked_publishes); + textSupportsBalance = root.findViewById(R.id.wallet_balance_staked_supports); textWalletHintSyncStatus = root.findViewById(R.id.wallet_hint_sync_status); - buttonViewMore = root.findViewById(R.id.view_more_button); - detailListView = root.findViewById(R.id.balance_detail_listview); + + linkUnlockTips = root.findViewById(R.id.wallet_unlock_tips_link); + progressUnlockTips = root.findViewById(R.id.wallet_unlock_tips_progress); recentTransactionsList = root.findViewById(R.id.wallet_recent_transactions_list); linkViewAll = root.findViewById(R.id.wallet_link_view_all); @@ -145,6 +144,7 @@ public class WalletFragment extends BaseFragment implements SdkStatusListener, W buttonBuyLBC = root.findViewById(R.id.wallet_buy_lbc_button); textConvertCredits = root.findViewById(R.id.wallet_hint_convert_credits); textConvertCreditsBittrex = root.findViewById(R.id.wallet_hint_convert_credits_bittrex); + textEarnMoreTips = root.findViewById(R.id.wallet_hint_earn_more_tips); textWhatSyncMeans = root.findViewById(R.id.wallet_hint_what_sync_means); textWalletReceiveAddress = root.findViewById(R.id.wallet_receive_address); buttonCopyReceiveAddress = root.findViewById(R.id.wallet_copy_receive_address); @@ -267,26 +267,29 @@ public class WalletFragment extends BaseFragment implements SdkStatusListener, W itemDecoration.setDrawable(ContextCompat.getDrawable(context, R.drawable.thin_divider)); recentTransactionsList.addItemDecoration(itemDecoration); - detailRows = new ArrayList(3); - - detailAdapter = new WalletDetailAdapter((MainActivity) context, detailRows); - detailListView.setAdapter(detailAdapter); - - buttonViewMore.setOnClickListener(new View.OnClickListener() { + linkUnlockTips.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - Context context = getContext(); - if (context instanceof MainActivity) { - View walletDetail = ((MainActivity) context).findViewById(R.id.balance_detail_listview); + if (context != null) { + AlertDialog.Builder builder = new AlertDialog.Builder(context). + setTitle(R.string.unlock_tips). + setMessage(R.string.confirm_unlock_tips) + .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + unlockTips(); + } + }).setNegativeButton(R.string.no, null); + builder.show(); + } + } + }); - if (walletDetail.getVisibility() == View.GONE) { - TransitionManager.beginDelayedTransition((ViewGroup) walletDetail.getParent()); - walletDetail.setVisibility(View.VISIBLE); - buttonViewMore.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, R.drawable.ic_arrow_dropup, 0); - } else { - walletDetail.setVisibility(View.GONE); - buttonViewMore.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, R.drawable.ic_arrow_dropdown, 0); - } + textEarnMoreTips.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + if (context instanceof MainActivity) { + ((MainActivity) context).openFragment(PublishFragment.class, true, NavMenuItem.ID_ITEM_NEW_PUBLISH); } } }); @@ -635,92 +638,36 @@ public class WalletFragment extends BaseFragment implements SdkStatusListener, W } public void onWalletBalanceUpdated(WalletBalance walletBalance) { - double totalBalance = walletBalance.getTotal().doubleValue(); - double spendableBalance = walletBalance.getAvailable().doubleValue(); - double supportingBalance = walletBalance.getClaims().doubleValue() + walletBalance.getTips().doubleValue() + walletBalance.getSupports().doubleValue(); - double usdBalance = spendableBalance * Lbryio.LBCUSDRate; + double balance = walletBalance.getAvailable().doubleValue(); + double usdBalance = balance * Lbryio.LBCUSDRate; double tipsBalance = walletBalance.getTips().doubleValue(); + double tipsUsdBalance = tipsBalance * Lbryio.LBCUSDRate; - if (detailRows == null) - detailRows = new ArrayList<>(3); - - if (detailAdapter == null) { - detailAdapter = new WalletDetailAdapter((MainActivity) getContext(), detailRows); - detailListView.setAdapter(detailAdapter); - } - - WalletDetailItem earnedBalance = new WalletDetailItem(getResources().getString(R.string.earned_from_others), getResources().getString(R.string.unlock_to_spend), Helper.SIMPLE_CURRENCY_FORMAT.format(tipsBalance), tipsBalance != 0, ((MainActivity) getContext()).isUnlockingTips()); - WalletDetailItem initialPublishes = new WalletDetailItem(getResources().getString(R.string.on_initial_publishes), getResources().getString(R.string.delete_or_edit_past_content), Helper.SIMPLE_CURRENCY_FORMAT.format(walletBalance.getClaims().doubleValue()), false, false); - WalletDetailItem supportingContent = new WalletDetailItem(getResources().getString(R.string.supporting_content), getResources().getString(R.string.delete_supports_to_spend), Helper.SIMPLE_CURRENCY_FORMAT.format(walletBalance.getSupports().doubleValue()), false, false); - - boolean needNotifyAdapter = false; - boolean firstDatasetNotification; - - if (detailRows.size() == 0) { - detailRows.add(0, earnedBalance); - detailRows.add(1, initialPublishes); - detailRows.add(2, supportingContent); - needNotifyAdapter = true; - firstDatasetNotification = true; - } else { - firstDatasetNotification = false; - if (!detailRows.get(0).detailAmount.equals(earnedBalance.detailAmount) - || detailRows.get(0).isInProgress != earnedBalance.isInProgress - || detailRows.get(0).isUnlockable != earnedBalance.isUnlockable) { - detailRows.set(0, earnedBalance); - needNotifyAdapter = true; - } - if (!detailRows.get(1).detailAmount.equals(initialPublishes.detailAmount)) { - detailRows.set(1, initialPublishes); - needNotifyAdapter = true; - } - if (!detailRows.get(2).detailAmount.equals(supportingContent.detailAmount)) { - detailRows.set(2, supportingContent); - needNotifyAdapter = true; - } - } - - if (needNotifyAdapter) { - // notifyDatasetChanged() doesn't work, so simply reset the adapter to the list - // to update the view - detailListView.setAdapter(detailAdapter); - - if (firstDatasetNotification) { - int listHeight = Math.round(getResources().getDisplayMetrics().density); - - for (int i = 0; i < detailRows.size(); i++) { - View item = detailAdapter.getView(i, null, detailListView); - item.measure(0, 0); - listHeight += item.getMeasuredHeight(); - } - - // Avoid scroll bars being displayed - ViewGroup.LayoutParams params = detailListView.getLayoutParams(); - params.height = listHeight + (detailListView.getCount() + 1) * detailListView.getDividerHeight(); - detailListView.setLayoutParams(params); - detailListView.setVerticalScrollBarEnabled(false); - detailListView.requestLayout(); - } - } - - String formattedTotalBalance = Helper.REDUCED_LBC_CURRENCY_FORMAT.format(totalBalance); - String formattedSpendableBalance = Helper.SIMPLE_CURRENCY_FORMAT.format(spendableBalance); - String formattedSupportingBalance = Helper.SIMPLE_CURRENCY_FORMAT.format(supportingBalance); - Helper.setViewText(walletTotalBalanceView, totalBalance > 0 && formattedTotalBalance.equals("0") ? Helper.FULL_LBC_CURRENCY_FORMAT.format(totalBalance) : formattedTotalBalance); - Helper.setViewText(walletSpendableBalanceView, spendableBalance > 0 && formattedSpendableBalance.equals("0") ? Helper.FULL_LBC_CURRENCY_FORMAT.format(spendableBalance) : formattedSpendableBalance); - Helper.setViewText(walletSupportingBalanceView, supportingBalance > 0 && formattedSupportingBalance.equals("0") ? Helper.FULL_LBC_CURRENCY_FORMAT.format(supportingBalance) : formattedSupportingBalance); - Helper.setViewText(textWalletInlineBalance, Helper.shortCurrencyFormat(spendableBalance)); + String formattedBalance = Helper.SIMPLE_CURRENCY_FORMAT.format(balance); + Helper.setViewText(textWalletBalance, balance > 0 && formattedBalance.equals("0") ? Helper.FULL_LBC_CURRENCY_FORMAT.format(balance) : formattedBalance); + Helper.setViewText(textTipsBalance, Helper.shortCurrencyFormat(tipsBalance)); + Helper.setViewText(textClaimsBalance, Helper.shortCurrencyFormat(walletBalance.getClaims().doubleValue())); + Helper.setViewText(textSupportsBalance, Helper.shortCurrencyFormat(walletBalance.getSupports().doubleValue())); + Helper.setViewText(textWalletInlineBalance, Helper.shortCurrencyFormat(balance)); if (Lbryio.LBCUSDRate > 0) { // only update display usd values if the rate is loaded Helper.setViewText(textWalletBalanceUSD, String.format("≈$%s", Helper.SIMPLE_CURRENCY_FORMAT.format(usdBalance))); + Helper.setViewText(textTipsBalanceUSD, String.format("≈$%s", Helper.SIMPLE_CURRENCY_FORMAT.format(tipsUsdBalance))); } - textWalletBalanceDesc.setText(spendableBalance == totalBalance ? getResources().getString(R.string.your_total_balance) : getResources().getString(R.string.all_of_this_is_yours)); - checkTips(); checkRewardsDriver(); } + private void unlockTips() { + Context context = getContext(); + if (context instanceof MainActivity) { + linkUnlockTips.setVisibility(View.GONE); + progressUnlockTips.setVisibility(View.VISIBLE); + ((MainActivity) context).unlockTips(); + } + } + public void checkTips() { checkTips(false); } @@ -734,6 +681,9 @@ public class WalletFragment extends BaseFragment implements SdkStatusListener, W MainActivity activity = (MainActivity) context; unlocking = activity.isUnlockingTips(); } + + Helper.setViewVisibility(linkUnlockTips, !forceHideLink && tipBalance > 0 && !unlocking ? View.VISIBLE : View.GONE); + Helper.setViewVisibility(progressUnlockTips, unlocking ? View.VISIBLE : View.GONE); } private void checkRewardsDriver() { diff --git a/app/src/main/java/io/lbry/browser/utils/Helper.java b/app/src/main/java/io/lbry/browser/utils/Helper.java index 7a2c5de2..fe374aac 100644 --- a/app/src/main/java/io/lbry/browser/utils/Helper.java +++ b/app/src/main/java/io/lbry/browser/utils/Helper.java @@ -77,7 +77,6 @@ public final class Helper { public static final String FILE_SIZE_FORMAT_PATTERN = "#,###.#"; public static final DecimalFormat LBC_CURRENCY_FORMAT = new DecimalFormat(LBC_CURRENCY_FORMAT_PATTERN); public static final DecimalFormat FULL_LBC_CURRENCY_FORMAT = new DecimalFormat("#,###.########"); - public static final DecimalFormat REDUCED_LBC_CURRENCY_FORMAT = new DecimalFormat("#,###.####"); public static final DecimalFormat SIMPLE_CURRENCY_FORMAT = new DecimalFormat("#,##0.00"); public static final SimpleDateFormat FILESTAMP_FORMAT = new SimpleDateFormat("yyyyMMdd_HHmmss"); public static final String EXPLORER_TX_PREFIX = "https://explorer.lbry.com/tx"; diff --git a/app/src/main/java/io/lbry/browser/utils/LbryUri.java b/app/src/main/java/io/lbry/browser/utils/LbryUri.java index d903cdb5..a55dd0f2 100644 --- a/app/src/main/java/io/lbry/browser/utils/LbryUri.java +++ b/app/src/main/java/io/lbry/browser/utils/LbryUri.java @@ -1,5 +1,8 @@ package io.lbry.browser.utils; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; @@ -8,6 +11,8 @@ import java.util.regex.Pattern; import io.lbry.browser.exceptions.LbryUriException; import lombok.Data; +import static org.apache.commons.codec.CharEncoding.UTF_8; + @Data public class LbryUri { public static final String LBRY_TV_BASE_URL = "https://lbry.tv/"; @@ -117,10 +122,17 @@ public class LbryUri { } } - String streamOrChannelName = components.get(2); + String streamOrChannelName = null; + String possibleStreamName = null; + try { + // Using java.net.URLDecoder to be able to quickly unit test + streamOrChannelName = URLDecoder.decode(components.get(2), UTF_8); + possibleStreamName = URLDecoder.decode(components.get(6), UTF_8); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } String primaryModSeparator = components.get(3); String primaryModValue = components.get(4); - String possibleStreamName = components.get(6); String secondaryModSeparator = components.get(7); String secondaryModValue = components.get(8); @@ -188,7 +200,18 @@ public class LbryUri { if (channelName != null) { formattedChannelName = channelName.startsWith("@") ? channelName : String.format("@%s", channelName); } - String primaryClaimName = claimName; + String primaryClaimName = null; + + if (protocol.equals(LBRY_TV_BASE_URL) && Helper.isNullOrEmpty(formattedChannelName)) { + try { + primaryClaimName = URLEncoder.encode(claimName, UTF_8); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } else { + primaryClaimName = claimName; + } + if (Helper.isNullOrEmpty(primaryClaimName)) { primaryClaimName = contentName; } @@ -218,7 +241,15 @@ public class LbryUri { secondaryClaimName = contentName; } if (Helper.isNullOrEmpty(secondaryClaimName)) { - secondaryClaimName = !Helper.isNullOrEmpty(formattedChannelName) ? streamName : null; + if (protocol.equals(LBRY_TV_BASE_URL)) { + try { + secondaryClaimName = !Helper.isNullOrEmpty(formattedChannelName) ? URLEncoder.encode(streamName, UTF_8) : null; + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } else { + secondaryClaimName = !Helper.isNullOrEmpty(formattedChannelName) ? streamName : null; + } } String secondaryClaimId = !Helper.isNullOrEmpty(secondaryClaimName) ? streamClaimId : null; diff --git a/app/src/main/java/io/lbry/browser/views/CreditsBalanceView.java b/app/src/main/java/io/lbry/browser/views/CreditsBalanceView.java deleted file mode 100644 index 725f1e81..00000000 --- a/app/src/main/java/io/lbry/browser/views/CreditsBalanceView.java +++ /dev/null @@ -1,69 +0,0 @@ -package io.lbry.browser.views; - -import android.annotation.SuppressLint; -import android.content.Context; -import android.content.res.Resources; -import android.content.res.TypedArray; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.graphics.Rect; -import android.graphics.drawable.Drawable; -import android.util.AttributeSet; -import android.util.DisplayMetrics; -import android.widget.TextView; - -import androidx.annotation.Nullable; - -import io.lbry.browser.R; - -public class CreditsBalanceView extends TextView { - float textFontSize; - private float iconSize; - Rect r; - Paint p; - - public CreditsBalanceView(Context context) { - super(context); - } - - public CreditsBalanceView(Context context, @Nullable AttributeSet attrs) { - super(context, attrs); - r = new Rect(); - p = new Paint(); - - TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.CreditsBalanceView,0, 0); - - try { - textFontSize = a.getDimension(R.styleable.CreditsBalanceView_textSize, 24f); - iconSize = a.getDimension(R.styleable.CreditsBalanceView_iconSize, 20f); - - this.setTextSize((int) textFontSize); - - DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics(); - float px = 8 * (metrics.densityDpi / 160f); - - setPadding((int) iconSize + Math.round(px), 0, 0, 0); - } finally { - a.recycle(); - } - - } - - @Override - protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec){ - super.onMeasure(widthMeasureSpec, heightMeasureSpec); - } - - protected void onDraw(Canvas canvas) { - super.onDraw(canvas); - - drawLbryCredits(canvas); - } - - private void drawLbryCredits(Canvas c) { - @SuppressLint("UseCompatLoadingForDrawables") Drawable icon = getResources().getDrawable(R.drawable.ic_credits, null); - float delta = (c.getHeight() - iconSize) / 2; - icon.setBounds(0, (int) delta, (int) iconSize, (int) (delta + iconSize)); - icon.draw(c); - } -} diff --git a/app/src/main/res/layout/card_wallet_balance.xml b/app/src/main/res/layout/card_wallet_balance.xml index c27a93af..c9d6a01f 100644 --- a/app/src/main/res/layout/card_wallet_balance.xml +++ b/app/src/main/res/layout/card_wallet_balance.xml @@ -1,7 +1,6 @@ @@ -9,122 +8,63 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content"> - - - + + android:textSize="20sp" /> + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values-af/strings.xml b/app/src/main/res/values-af/strings.xml index c1f021f5..dd36539b 100644 --- a/app/src/main/res/values-af/strings.xml +++ b/app/src/main/res/values-af/strings.xml @@ -252,8 +252,15 @@ Balans + U het tans U kan u krediete in USD omskakel en die omgeskakelde bedrag met \'n uitruil onttrek. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Skakel krediete na USD op Bittrex</a> + Jy het ook + Jy het vasgehou + in wenke + in u publikasies + in u steun + Verdien meer wenke deur cool video\'s op te laai Die agtergronddiens word steeds geïnitialiseer. U kan die inhoud intussen verken en kyk. U kan dit nie nou doen nie, want die agtergronddiens is nog besig om te initialiseer. diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index f78bf90a..2dd06daf 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -265,8 +265,15 @@ Balanç + Ara tens Pots convertir els teus crèdits a USD i retirar la quantitat convertida emprant un intercanvi. <a href=\"https://lbry.com/faq/exchanges\">Aprèn-ne més</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Converteix crèdits a USD a Bittrex</a> + També tens + Has invertit + en propines + en les teves publicacions + en els teus suports + Obtén més propines pujant vídeos genials El servei en segon pla s\'està inicialitzant... El servei en segon pla encara s\'està inicialitzant. Pots explorar i veure contingut mentrestant. No pots fer això ara perquè el servei en segon pla encara s\'està inicialitzant. diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 8c29fc0a..41eaeeda 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -256,8 +256,15 @@ Bitte versuche es später erneut. Kontostand + Sie haben derzeit Sie können Ihr Guthaben in USD umrechnen und den umgerechneten Betrag über einen Umtausch abheben. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + Sie haben auch + Sie haben gesteckt + in Trinkgeldern + in Deinen Veröffentlichungen + in Deinen Unterstützungen + Verdienen Sie weitere Tipps, indem Sie coole Videos hochladen Der Hintergrunddienst wird noch initialisiert. In der Zwischenzeit können Sie Inhalte erkunden und ansehen. Sie können dies derzeit nicht tun, da der Hintergrunddienst noch initialisiert wird. diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 3de9690f..7fbc797d 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -265,8 +265,15 @@ Saldo + Tu Actualmente tienes Puede convertir sus créditos a USD y retirar el monto convertido mediante un intercambio. <a href=\"https://lbry.com/faq/exchanges\">Aprender más</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convierta créditos a USD en Bittrex</a> + También tienes + En stake + en propinas + en tus publicaciones + en tus propinas + Obtenga más propinas al subir videos geniales El servicio en segundo plano se está iniciando... El servicio en segundo plano aún se está iniciando. Puede explorar y ver contenido mientras tanto. No puede hacer esto ahora porque el servicio en segundo plano todavía no está iniciado. diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index bf0a0513..4a691aec 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -221,8 +221,15 @@ Saldo + Hetkel on sul Valuutavahetustes saad vahetada oma LBC raha USD vastu ja selle välja võtta. <a href=\"https://lbry.com/faq/exchanges\">Loe lisa</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Valuutavahetus Bittrex LBC > USD</a> + Lisaks on sul + Sul on panused + jootrahana + sinu postitustes + sinu toetustes + Teeni lisapreemiaid laadides üles huvitavaid videosid Taustateenus veel stardib. Võid seniks postitusi sirvida. Seda ei saa hetkel teha, kuna taustateenus pole veel käivitunud. diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index acc9d256..668ba22b 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -265,8 +265,15 @@ Solde + Vous avez actuellement Vous pouvez convertir vos crédits en USD et retirer le montant converti à l\'aide d\'un échange. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + Vous avez aussi + Tu as jalonné + En pourboires + dans vos publications + dans vos supports + Obtenez plus de pourboire en téléchargeant des vidéos sympas Le service d\'arrière-plan est en cours d\'initialisation… Le service d\'arrière-plan est toujours en cours d\'initialisation. Vous pouvez explorer et regarder du contenu en attendant. Vous ne pouvez pas le faire pour le moment car le service d\'arrière-plan est toujours en cours d\'initialisation. diff --git a/app/src/main/res/values-gu/strings.xml b/app/src/main/res/values-gu/strings.xml index 951515ab..7c426dc6 100644 --- a/app/src/main/res/values-gu/strings.xml +++ b/app/src/main/res/values-gu/strings.xml @@ -252,8 +252,15 @@ બેલેન્સ + તમારી પાસે હાલમાં તમે તમારા ક્રેડિટને USD માં કન્વર્ટ કરી શકો છો અને એક્સચેંજનો ઉપયોગ કરીને રૂપાંતરિત રકમ પાછા ખેંચી શકો છો. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + તમારી પાસે પણ છે + તમે સ્ટેક્ડ + ટીપ્સમાં + તમારા પ્રકાશનોમાં + તમારા સપોર્ટ + કૂલ વિડિઓઝ અપલોડ કરીને વધુ ટીપ્સ કમાઓ પૃષ્ઠભૂમિ સેવા હજી પ્રારંભ થઈ રહી છે. તમે સરેરાશ સમયમાં અન્વેષણ કરી શકો છો અને સામગ્રી જોઈ શકો છો. તમે હમણાં આ કરી શકતા નથી કારણ કે પૃષ્ઠભૂમિ સેવા હજી પ્રારંભ થઈ રહી છે. diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index edb5a171..b2304d89 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -281,8 +281,15 @@ מאזן + יש לך כרגע ביכולתך להמיר את הקרדיט שלך ל-USD ולמשוך את הסכום המומר באמצעות חלפניה. <a href=\"https://lbry.com/faq/exchanges\">למדו עוד</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">המר קרדיט ל-USD באתר Bittrex</a> + יש לך גם + השקעת + בטיפים + בפרסומים שלך + בפעולות תמיכה + הרווח יותר טיפים ע\"י העלאת סרטונים מגניבים תהליך הרקע כרגע מתאתחל… תהליך הרקע כרגע מתאתחל. אתה יכול לבצע סקירה ולצפות בתכנים בינתיים. אינך יכול לבצע זאת בינתיים משום שתהליך הרקע עדיין מתאתחל. diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index d42a0911..0453a6b0 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -265,8 +265,15 @@ बैलेंस + आपके पास अभी है आप अपने क्रेडिटस को यूसडी में बदल सकते हैं और उन्हें एक्सचेंज की मदद से निकाल भी सकते हैं। <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\"> क्रेडिटस को यूसडी में बदलें बिट्रिक्स पर</a> + आपके पास और भी है + आपने स्टेक की है + टिप्स में + आपकी पब्लिशिस में हैं + आपके सपोर्ट्स में हैं + मनोरंजक वीडियोस अपलोड करके और अधिक टिप्स कमाए पृष्ठभूमि सेवा प्रारंभ कर रहा है ... पृष्ठभूमि सेवाएं अभी भी शुरू हो रही है। इस दौरान आप अन्य सामग्री को खोज एवं देख सकते हैं। आप यह अभी नहीं कर सकते हैं क्योंकि पृष्ठभूमि सेवाएं अभी भी शुरू हो रही है diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 02fa0495..2bfccd91 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -257,8 +257,15 @@ Saldo + Anda sekarang punya Anda dapat mengonversi kredit Anda ke USD dan menarik jumlah yang dikonversi menggunakan pertukaran. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + Kamu juga punya + Anda mempertaruhkan + dalam tips + di publikasi Anda + dalam dukungan Anda + Hasilkan lebih banyak tips dengan mengunggah video keren Layanan latar belakang sedang menginisialisasi... Layanan latar belakang masih diinisialisasi. Anda dapat menjelajahi dan menonton konten dalam waktu yang bersamaan. Anda tidak dapat melakukan ini sekarang karena layanan latar belakang masih diinisialisasi. diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 9c999cbe..818b0811 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -265,8 +265,15 @@ Saldo + Hai attualmente Puoi convertire i tuoi crediti in USD e trasferire il valore convertito utilizzando un cambio. <a href=\"https://lbry.com/faq/exchanges\">Vedi altro</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Converti crediti in USD su Bittrex</a> + Hai anche + Hai accumulato + in donaziones + nelle tue pubblicazioni + nei tuoi supporti + Guadagna altre donazioni caricando video interessanti Avvio servizio in background... Il servizio in background è ancora in avvio. Puoi esplorare e visualizzare contenuti nel frattempo. Non puoi fare questo al momento perché il servizio in background è ancora in avviamento. diff --git a/app/src/main/res/values-jv/strings.xml b/app/src/main/res/values-jv/strings.xml index 01b9c9f0..5cb1c3bd 100644 --- a/app/src/main/res/values-jv/strings.xml +++ b/app/src/main/res/values-jv/strings.xml @@ -257,8 +257,15 @@ Duwitmu + Sampeyan saiki duwe Sampeyan bisa ngowahi kridit sampeyan menyang USD lan mbatalake jumlah sing diowahi nggunakake ijol-ijolan. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + Sampeyan yo duwe + Sampeyan naruhno + ing tips + ing nerbitake sampeyan + ing dhukungan sampeyan + Entuk tips liyane kanthi ngunggah video sing viral Miwiti Layanan latar mburi... Layanan latar mburi isih miwiti. Sampeyan bisa njelajah lan nonton konten ing wektu tegese. Sampeyan ora bisa nindakake iki saiki amarga layanan latar mburi isih miwiti. diff --git a/app/src/main/res/values-ms/strings.xml b/app/src/main/res/values-ms/strings.xml index f871b317..c61b38ed 100644 --- a/app/src/main/res/values-ms/strings.xml +++ b/app/src/main/res/values-ms/strings.xml @@ -258,8 +258,15 @@ Sila kembali sebentar lagi. Baki + Anda kini mempunyai Anda boleh menukar kredit anda ke USD dan keluarkan jumlah tersebut menerusi sebuah bursa. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Tukar kredit ke USD dengan Bittrex</a> + Anda juga mempunyai + Anda mempertaruhkan + dalam tips + dalam terbitan anda + dalam sokongan anda + Dapatkan lebih banyak tips dengan memuat-naik video yang menarik Servis latar belakang sedang diinisialisasi... Servis latar belakang masih diinisialisasi. Anda boleh meneroka dan menonton kandungan dalam masa yang sama. Anda tidak dapat melakukan ini sekarang kerana servis latar belakang masih diinisialisasi. diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 9f6917e0..d2846b23 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -252,8 +252,15 @@ Balans + U hebt momenteel U kunt uw tegoeden omzetten in USD en het omgerekende bedrag opnemen met een omwisseling. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + U hebt ook + U hebt ingezet + in fooien + in uw publicaties + in uw steunen + Verdien meer fooien door coole video\'s te uploaden De achtergrondservice wordt nog geïnitialiseerd. U kunt ondertussen inhoud verkennen en bekijken. U kunt dit nu niet doen omdat de achtergrondservice nog steeds wordt geïnitialiseerd. diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 557d874f..f7d8a994 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -281,8 +281,15 @@ Balans + Obecnie posiadasz Możesz zamienić swoje kredyty na USD i wypłacić przeliczoną kwotę za pomocą giełdy. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + Posiadasz również + Zestackowane + w napiwkach + w twoich publikacjach + w twoich wsparciach + Zarób więcej napiwków publikując fajne filmiki Usługa w tle jest inicjowana... Usługa w tle jest nadal inicjowana. W międzyczasie możesz eksplorować i oglądać treści. Nie możesz tego teraz zrobić, ponieważ usługa w tle wciąż się inicjuje. diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index c11bfd66..90bce54d 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -265,8 +265,15 @@ Saldo + Você tem atualmente Você pode converter seus créditos em USD e retirar o valor convertido usando uma exchange. <a href=\"https://lbry.com/faq/exchanges\">Saiba mais</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Converter creditos para USD no Bittrex</a> + Você também tem + Você investiu + em gorjetas + nas suas publicções + Nos seus apoios + Ganhe mais gorjetas enviando vídeos legais O serviço de segundo plano está sendo inicializado.... O serviço de segundo plano ainda está sendo inicializado. Você pode explorar conteúdos incríveis nesse meio tempo. Você não pode fazer isso agora porque o serviço de segundo plano ainda está sendo inicializado. diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index b74185ed..d6e48ebc 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -265,8 +265,15 @@ Saldo + Atualmente você tem Você pode converter seus créditos em dólares americanos e retirar o valor convertido usando uma exchange. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + Você também tem + Você acumulou + em gorjetas + nas suas publicações + nos seus apoios + Ganhe mais gorjetas enviando videos legais O serviço em segundo plano está inicializando... O serviço em segundo plano ainda está sendo inicializado. Você pode explorar e assistir ao conteúdo nesse meio tempo. Você não pode fazer isso agora porque o serviço em segundo plano ainda está sendo inicializado. diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 16602da4..62e25ed3 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -260,8 +260,15 @@ Sold + Acum ai Îţi poţi converti creditele în USD şi să retragi suma folosind o casă de schimb. <a href=\"https://lbry.com/faq/exchanges\">Detalii</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Schimbă creditele în USD la Bittrex</a> + Mai ai și + Ai depus + în bacşişuri + în publicările tale + în susţinerile tale + Câştigă mai multe bacşişuri publicând conţinut Serviciul din fundal încă se iniţializează. Poţi explora şi vedea conţinut între timp. Nu poţi face asta acum deoarce serviciul din fundal încă se iniţializează. diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 43206fae..0d95fbbf 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -281,8 +281,15 @@ Баланс + У Вас сейчас есть Вы можете поменять кредиты на доллары США и снять сумму, используя обменник. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + У Вас также есть + У Вас сохранено + в чаевых + в Ваших публикациях + в Ваших поддержках + Заработайте больше чаевых, загружая крутые видео Фоновый сервис запускается... Фоновый сервис всё ещё запускается. Между тем Вы уже можете искать и смотреть какой-либо контент. Вы не можете сделать это прямо сейчас, потому что фоновый сервис всё ещё запускается. diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 873e28df..3d2ab68d 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -273,8 +273,15 @@ Balans + Trenutno imate Možete konvertovati vaše kredite u USD i unovčiti konvertovani iznos koristeći menjačnicu. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + Takođje imate + Vi štedite + u tipovima + u vašim objavama + u vašim podrškama + Zaradi više tipova tako što ćeš objaviti što više cool video klipova Pozadinski servis se pokreće... Pokretanje pozadinskog servisa je i dalje u toku. Za to vreme možete istraživati i gledati sadržaje. Ne možete uraditi ovo za vreme učitavanja pozadinskog servisa. diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 5aeef757..76a5e4bb 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -252,8 +252,15 @@ Bakiye + Şuna sahipsiniz Kredilerinizi USD\'ye çevirebilir ve döviz hizmeti ile paranızı çekebilirsiniz. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + Şunlara da sahipsiniz + Ayırdığınız miktar + bahşiş olarak + yayınlarınızda mevcut olan + desteklerinizde mevcut olan + Daha havalı videolar yükleyerek daha çok bahşiş kazan Arkaplan servisi hala başlatılıyor. Bu arada siz içerikleri keşfedebilir ve izleyebilirsiniz. Bunu şu an yapamazsınız çünkü arkaplan servisi hala başlatılıyor. diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 9c444332..2a352775 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -268,8 +268,15 @@ Рахунок + У Вас зараз є Ви можете обміняти кредити на долари США та зняти ці гроші за допомогою обміннику. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Convert credits to USD on Bittrex</a> + У Вас також є + Ви стейкнули + в чайових + у Ваших публікаціях + у Ваших підтримках + Заробляйте більше чайових, завантажуючи класні відео Фоновий сервіс все ще ініціалізується. Ви можете шукати та переглядати у цей час. Ви не можете публікувати контент прямо зараз, тому що фоновий сервіс все ще ініціалізується. diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 7497092a..991016a8 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -245,8 +245,15 @@ Tài khoản + Bạn hiện có Bạn có thể chuyển đổi tín dụng của mình sang USD và rút số tiền đã chuyển đổi bằng cách sử dụng một trao đổi. <a href=\"https://lbry.com/faq/exchanges\">Learn more</a>. <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">Đổi LBC sang USD tại Bittrex</a> + Bạn cũng có + Bạn đặt cược + in tips + trong nội dung của bạn + trong sự hỗ trợ của bạn + Kiếm thêm tiền bằng cách tải lên các video thú vị Dịch vụ nền vẫn đang khởi tạo. Bạn có thể khám phá và xem nội dung trong thời gian trung bình. Bạn không thể làm điều này ngay bây giờ vì dịch vụ nền vẫn đang khởi tạo. diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index ef09f7bd..d09b3d71 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -257,8 +257,15 @@ 餘額 + 你目前有 你可以把信用額兌換為美元然後到交易所提取。<a href=\"https://lbry.com/faq/exchanges\">了解更多</a>。 <a href=\"https://bittrex.com/Account/Register?referralCode=4M1-P30-BON\">在Bittrex上轉換美元</a> + 你同時有 + 你累計 + 於小費 + 為發佈押金 + 你支持的內容 + 上傳酷酷的影片以獲得更多小費 背景程式執行初始化中…… 背景程式仍在初始化。與此同時,你可以探索和觀看內容。 你目前還不能執行這動作,因為背景程式仍在初始化。 diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml deleted file mode 100644 index 6ecc4827..00000000 --- a/app/src/main/res/values/attrs.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index e7aef495..4ab4520f 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -5,7 +5,4 @@ 8dp 176dp 16dp - 14sp - 12sp - 12sp \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8b4bce94..2f2ce179 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -277,19 +277,15 @@ Balance - Your total balance. - Your total balance. All of this is yours, but some credits are in use on channels and content right now. + You currently have You can convert your credits to USD and withdraw the converted amount using an exchange. <a href="https://lbry.com/faq/exchanges">Learn more</a>. <a href="https://bittrex.com/Account/Register?referralCode=4M1-P30-BON">Convert credits to USD on Bittrex</a> - immediately spendable - boosting content - View more - …earned from others - …on initial publishes - …supporting content - (Unlock to spend) - (Delete or edit past content to spend) - (Delete supports to spend) + You also have + You staked + in tips + in your publishes + in your supports + Earn more tips by uploading cool videos The background service is initializing… The background service is still initializing. You can explore and watch content in the mean time. You cannot do this right now because the background service is still initializing. @@ -456,9 +452,6 @@ Twitter Verification Get instantly verified using your Twitter account. Your Twitter email address must match the email that you provided and your account should be active. Verify with Twitter - Phone Number Verification - Get instantly verified using your phone number. - Verify with phone number Skip the Queue Skip the manual verification queue by paying a fee in order to start participating in the rewards program immediately. If you previously completed a purchase successfully and you still see this screen, please tap the verify purchase button below. diff --git a/app/src/test/java/io/lbry/browser/utils/LbryUriTest.java b/app/src/test/java/io/lbry/browser/utils/LbryUriTest.java index 1a5730e6..7dfa46af 100644 --- a/app/src/test/java/io/lbry/browser/utils/LbryUriTest.java +++ b/app/src/test/java/io/lbry/browser/utils/LbryUriTest.java @@ -113,6 +113,32 @@ public class LbryUriTest { assertEquals(expectedForChannel, obtained); } + @Test + public void parseLbryTvWithEncodedChars() { + LbryUri obtained = new LbryUri(); + + try { + obtained = LbryUri.parse("https://lbry.tv/@Content_I_Like:1/DR.-ASTRID-ST%C3%9CCKELBERGER:2",false); + } catch (LbryUriException e) { + e.printStackTrace(); + } + + expected = new LbryUri(); + expected.setChannelName("@Content_I_Like"); + expected.setStreamName("DR.-ASTRID-STÜCKELBERGER"); + + try { + LbryUri.UriModifier primaryMod = LbryUri.UriModifier.parse("#", "1"); + LbryUri.UriModifier secondaryMod = LbryUri.UriModifier.parse("#", "2"); + expected.setChannelClaimId(primaryMod.getClaimId()); + expected.setStreamClaimId(secondaryMod.getClaimId()); + } catch (LbryUriException e) { + e.printStackTrace(); + } + + assertEquals(expected, obtained); + } + @Test public void lbryToTvString() { LbryUri obtained = new LbryUri(); @@ -126,6 +152,32 @@ public class LbryUriTest { assertEquals("https://lbry.tv/@lbry:3f/lbryturns4:6", obtained.toTvString()); } + @Test + public void lbryToTvStringWithEncodedChars() { + LbryUri obtained = new LbryUri(); + + try { + obtained = LbryUri.parse("lbry://La-Peur,-Nos-Attentats,-c'est-VOTRE-Sécurité!-Les-Guignols#6",false); + } catch (LbryUriException e) { + e.printStackTrace(); + } + + assertEquals("https://lbry.tv/La-Peur%2C-Nos-Attentats%2C-c%27est-VOTRE-Se%CC%81curite%CC%81%21-Les-Guignols:6", obtained.toTvString()); + } + + @Test + public void lbryToTvStringWithChannelAndEncodedChars() { + LbryUri obtained = new LbryUri(); + + try { + obtained = LbryUri.parse("lbry://@test#1/La-Peur,-Nos-Attentats,-c'est-VOTRE-Sécurité!-Les-Guignols#6",false); + } catch (LbryUriException e) { + e.printStackTrace(); + } + + assertEquals("https://lbry.tv/@test:1/La-Peur%2C-Nos-Attentats%2C-c%27est-VOTRE-Se%CC%81curite%CC%81%21-Les-Guignols:6", obtained.toTvString()); + } + @NotNull private LbryUri sinthesizeExpected() { LbryUri expectedForChannel = new LbryUri();