adjust minimum deposit. fix channel edit mode.

This commit is contained in:
Akinwale Ariwodola 2020-05-22 05:52:49 +01:00
parent 2f7e999e49
commit b901ff7b0d
5 changed files with 16 additions and 12 deletions

View file

@ -1665,6 +1665,10 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
@Override @Override
public void onSyncGetWalletNotFound() { public void onSyncGetWalletNotFound() {
// pass. This actually shouldn't happen at this point. // pass. This actually shouldn't happen at this point.
// But if it does, send what we have
if (Lbryio.isSignedIn() && userSyncEnabled()) {
syncApplyAndSet();
}
} }
@Override @Override

View file

@ -289,7 +289,7 @@ public class ChannelFormFragment extends BaseFragment implements
} }
private void validateAndSaveClaim(Claim claim) { private void validateAndSaveClaim(Claim claim) {
if (Helper.isNullOrEmpty(claim.getName())) { if (!editMode && Helper.isNullOrEmpty(claim.getName())) {
showError(getString(R.string.please_enter_channel_name)); showError(getString(R.string.please_enter_channel_name));
return; return;
} }
@ -629,13 +629,13 @@ public class ChannelFormFragment extends BaseFragment implements
private Claim buildChannelClaimToSave() { private Claim buildChannelClaimToSave() {
Claim claim = new Claim(); Claim claim = new Claim();
if (!editMode) { String name = Helper.getValue(inputChannelName.getText());
String name = Helper.getValue(inputChannelName.getText()); if (!name.startsWith("@")) {
if (!name.startsWith("@")) { name = String.format("@%s", name);
name = String.format("@%s", name); }
} claim.setName(name);
claim.setName(name);
} else if (currentClaim != null) { if (currentClaim != null) {
claim.setClaimId(currentClaim.getClaimId()); claim.setClaimId(currentClaim.getClaimId());
} }

View file

@ -437,8 +437,8 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
} }
try { try {
if (tabPager.getAdapter() == null) { if (tabPager.getAdapter() == null && context instanceof MainActivity) {
tabPager.setAdapter(new ChannelPagerAdapter(claim, (MainActivity) getContext())); tabPager.setAdapter(new ChannelPagerAdapter(claim, (MainActivity) context));
} }
} catch (IllegalStateException ex) { } catch (IllegalStateException ex) {
// TODO: Fix why this is happening // TODO: Fix why this is happening

View file

@ -68,7 +68,7 @@ public final class Helper {
public static final MediaType FORM_MEDIA_TYPE = MediaType.parse("application/x-www-form-urlencoded"); public static final MediaType FORM_MEDIA_TYPE = MediaType.parse("application/x-www-form-urlencoded");
public static final MediaType JSON_MEDIA_TYPE = MediaType.get("application/json; charset=utf-8"); public static final MediaType JSON_MEDIA_TYPE = MediaType.get("application/json; charset=utf-8");
public static final int CONTENT_PAGE_SIZE = 25; public static final int CONTENT_PAGE_SIZE = 25;
public static final double MIN_DEPOSIT = 0.01; public static final double MIN_DEPOSIT = 0.001;
public static final String LBC_CURRENCY_FORMAT_PATTERN = "#,###.##"; public static final String LBC_CURRENCY_FORMAT_PATTERN = "#,###.##";
public static final String FILE_SIZE_FORMAT_PATTERN = "#,###.#"; 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 LBC_CURRENCY_FORMAT = new DecimalFormat(LBC_CURRENCY_FORMAT_PATTERN);

View file

@ -344,7 +344,7 @@
<string name="show_advanced">Show advanced</string> <string name="show_advanced">Show advanced</string>
<string name="hide_advanced">Hide advanced</string> <string name="hide_advanced">Hide advanced</string>
<string name="name">Name</string> <string name="name">Name</string>
<string name="min_deposit">0.01</string> <string name="min_deposit">0.001</string>
<string name="content_successfully_reposted">The content was successfully reposted!</string> <string name="content_successfully_reposted">The content was successfully reposted!</string>
<string name="repost_name_invalid_characters">The repost name contains invalid characters.</string> <string name="repost_name_invalid_characters">The repost name contains invalid characters.</string>
<plurals name="you_sent_a_tip"> <plurals name="you_sent_a_tip">