Filter own claims fron downloads. Fix address input.

This commit is contained in:
Akinwale Ariwodola 2020-05-22 04:31:12 +01:00
parent 5839821f8f
commit 528f81c59a
2 changed files with 8 additions and 1 deletions

View file

@ -516,7 +516,10 @@ public class PublishFormFragment extends BaseFragment implements
}
if (this.currentClaim == null && params.containsKey("suggestedUrl")) {
Helper.setViewText(inputAddress, (String) params.get("suggestedUrl"));
String suggestedUrl = (String) params.get("suggestedUrl");
if (!Helper.isNullOrEmpty(suggestedUrl) && Helper.isNullOrEmpty(Helper.getValue(inputAddress.getText()))) {
Helper.setViewText(inputAddress, (String) params.get("suggestedUrl"));
}
}
} else {
// shouldn't actually happen

View file

@ -648,6 +648,10 @@ public final class Helper {
List<LbryFile> filtered = new ArrayList<>();
for (int i = 0; i < files.size(); i++) {
LbryFile file = files.get(i);
// remove own claims as well
if (file.getClaim() != null && Lbry.ownClaims.contains(file.getClaim())) {
continue;
}
if (!Helper.isNullOrEmpty(file.getDownloadPath())) {
filtered.add(file);
}