Fixes a small issue introduced in commit 1935253c18 where pasting in the composer crashes when it doesn't contain a URL (so any other textual paste will crash). The code was intended only for "share" actions, hence why it was expecting a URL enclosed.

This commit is contained in:
Vavassor 2017-06-23 01:22:18 -04:00
parent b1aa05694e
commit ef60701627

View file

@ -40,8 +40,8 @@ public class ParserUtils {
// If we share with an app, it's not only an url
List<String> strings = StringUtils.extractUrl(pasteData);
String url = strings.get(0); // we assume that the first url is the good one
if (strings.size() > 0) {
String url = strings.get(0); // we assume that the first url is the good one
if (URLUtil.isValidUrl(url)) {
new ThreadHeaderInfo().execute(url);
}