Filter own claims fron downloads. Fix address input.
This commit is contained in:
parent
5839821f8f
commit
528f81c59a
2 changed files with 8 additions and 1 deletions
|
@ -516,7 +516,10 @@ public class PublishFormFragment extends BaseFragment implements
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.currentClaim == null && params.containsKey("suggestedUrl")) {
|
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 {
|
} else {
|
||||||
// shouldn't actually happen
|
// shouldn't actually happen
|
||||||
|
|
|
@ -648,6 +648,10 @@ public final class Helper {
|
||||||
List<LbryFile> filtered = new ArrayList<>();
|
List<LbryFile> filtered = new ArrayList<>();
|
||||||
for (int i = 0; i < files.size(); i++) {
|
for (int i = 0; i < files.size(); i++) {
|
||||||
LbryFile file = files.get(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())) {
|
if (!Helper.isNullOrEmpty(file.getDownloadPath())) {
|
||||||
filtered.add(file);
|
filtered.add(file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue