Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
billthefarmer committed May 2, 2019
1 parent f68e04d commit a818f57
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/org/billthefarmer/diary/Diary.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public class Diary extends Activity
private final static String SHOWN = "shown";
private final static String ENTRY = "entry";

//Patterns
// Patterns
public final static Pattern PATTERN_CHARS =
Pattern.compile("[\\(\\)\\[\\]\\{\\}\\<\\>\"'`]");
Pattern.compile("[\\(\\)\\[\\]\\{\\}\\<\\>\"'`]");
private final static Pattern MEDIA_PATTERN =
Pattern.compile("!\\[(.*)\\]\\((.+)\\)", Pattern.MULTILINE);
private final static Pattern EVENT_PATTERN =
Expand Down Expand Up @@ -1243,14 +1243,15 @@ else if (type.startsWith(IMAGE) ||
// Try to get the path as an uri
Uri uri = Uri.parse(path);
// Check if it's an URL
if ((uri != null) && (uri.getScheme() != null) &&
(uri.getScheme().equalsIgnoreCase(HTTP) ||
uri.getScheme().equalsIgnoreCase(HTTPS)))
if ((uri != null) &&
(HTTP.equalsIgnoreCase(uri.getScheme()) ||
HTTPS.equalsIgnoreCase(uri.getScheme())))
media = uri;
}

addMedia(media, true);
} else if (Intent.ACTION_SEND_MULTIPLE.equals(intent.getAction()))
}
else if (Intent.ACTION_SEND_MULTIPLE.equals(intent.getAction()))
{
// Get the media
ArrayList<Uri> media =
Expand Down

0 comments on commit a818f57

Please sign in to comment.