diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/ErrorStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/ErrorStatusDisplayItem.java index 20ca27d6ed..a271c2325a 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/ErrorStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/ErrorStatusDisplayItem.java @@ -39,6 +39,16 @@ public Holder(Context context, ViewGroup parent) { findViewById(R.id.button_copy_error_details).setOnClickListener(this::copyErrorDetails); } + @Override + public void onClick(){ + // explicitly do nothing when clicked + } + + @Override + public boolean isEnabled(){ + return false; + } + @Override public void onBind(ErrorStatusDisplayItem item) { openInBrowserButton.setEnabled(item.status!=null && item.status.url!=null); diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java b/mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java index 9d679db334..9698d911d7 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/text/HtmlParser.java @@ -140,7 +140,7 @@ public void head(@NonNull Node node, int depth){ String href=el.attr("href"); LinkSpan.Type linkType; String text=el.text(); - if(el.hasClass("hashtag") || text.startsWith("#")){ + if(!TextUtils.isEmpty(text) && (el.hasClass("hashtag") || text.startsWith("#"))){ // MOSHIDON: we have slightly refactored this so that the hashtags properly work in akkoma // TODO: upstream this linkType=LinkSpan.Type.HASHTAG;