mirror of
https://github.com/readrops/Readrops.git
synced 2025-02-02 19:56:50 +01:00
Handle feed site url and item author nullability
This commit is contained in:
parent
c5476199d8
commit
aafec850bb
@ -172,7 +172,7 @@ public class ItemActivity extends AppCompatActivity {
|
|||||||
Utils.setDrawableColor(dateLayout.getBackground(), itemWithFeed.getColor());
|
Utils.setDrawableColor(dateLayout.getBackground(), itemWithFeed.getColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.getAuthor() != null) {
|
if (item.getAuthor() != null && !item.getAuthor().isEmpty()) {
|
||||||
author.setText(getString(R.string.by_author, item.getAuthor()));
|
author.setText(getString(R.string.by_author, item.getAuthor()));
|
||||||
author.setVisibility(View.VISIBLE);
|
author.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,12 @@ public class ReadropsWebView extends WebView {
|
|||||||
@Nullable
|
@Nullable
|
||||||
private String getText() {
|
private String getText() {
|
||||||
if (itemWithFeed.getItem().getText() != null) {
|
if (itemWithFeed.getItem().getText() != null) {
|
||||||
Document document = Jsoup.parse(Parser.unescapeEntities(itemWithFeed.getItem().getText(), false), itemWithFeed.getWebsiteUrl());
|
Document document;
|
||||||
|
|
||||||
|
if (itemWithFeed.getWebsiteUrl() != null)
|
||||||
|
document = Jsoup.parse(Parser.unescapeEntities(itemWithFeed.getItem().getText(), false), itemWithFeed.getWebsiteUrl());
|
||||||
|
else
|
||||||
|
document = Jsoup.parse(Parser.unescapeEntities(itemWithFeed.getItem().getText(), false));
|
||||||
|
|
||||||
formatDocument(document);
|
formatDocument(document);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user