Merge pull request #526 from FineFindus/fix/empty-hashtag
feat(Error): disable clicking + crash fix
This commit is contained in:
commit
f30e12f5c6
|
@ -39,6 +39,16 @@ public class ErrorStatusDisplayItem extends StatusDisplayItem{
|
||||||
findViewById(R.id.button_copy_error_details).setOnClickListener(this::copyErrorDetails);
|
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
|
@Override
|
||||||
public void onBind(ErrorStatusDisplayItem item) {
|
public void onBind(ErrorStatusDisplayItem item) {
|
||||||
openInBrowserButton.setEnabled(item.status!=null && item.status.url!=null);
|
openInBrowserButton.setEnabled(item.status!=null && item.status.url!=null);
|
||||||
|
|
|
@ -140,7 +140,7 @@ public class HtmlParser{
|
||||||
String href=el.attr("href");
|
String href=el.attr("href");
|
||||||
LinkSpan.Type linkType;
|
LinkSpan.Type linkType;
|
||||||
String text=el.text();
|
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
|
// MOSHIDON: we have slightly refactored this so that the hashtags properly work in akkoma
|
||||||
// TODO: upstream this
|
// TODO: upstream this
|
||||||
linkType=LinkSpan.Type.HASHTAG;
|
linkType=LinkSpan.Type.HASHTAG;
|
||||||
|
|
Loading…
Reference in New Issue