From d766100c297bc094491de150f24c04719ffa8f4e Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 18 Jan 2018 23:23:56 -0500 Subject: Enhancement/speed up (#650) * Revert back to m.facebook * Add initial speedup * Update theme * Fix link press for event status * Move web states to fb const * Fix images and email * Fix up flyweight for requests * Ensure frost request is synchronous * Prepare diff utils * Improve speed and fix blank overlay * Update comments * Add debugger and fix searchview * Theme discover pages. Resolves #654 * Fix duplicate reload * Fix image loading * Update changelog * Update tests * Rename test Update dependencies Update gitignore --- .../kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'app/src/test/kotlin/com/pitchedapps/frost/facebook') diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt index 79d5ea64..e508c3fe 100644 --- a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt +++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbUrlTest.kt @@ -20,7 +20,7 @@ class FbUrlTest { @Test fun base() { - val url = "https://touch.facebook.com/relative/?asdf=1234&hjkl=7890" + val url = "${FB_URL_BASE}relative/?asdf=1234&hjkl=7890" assertFbFormat(url, url) } @@ -62,11 +62,11 @@ class FbUrlTest { @Test - fun imageRegex() { + fun image() { arrayOf( - "https://scontent-yyz1-1.xx.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/229_546131_836546862_n.jpg?efg=e343J9&oh=d4245b1&oe=5453", - "/photo/view_full_size/?fbid=1523&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=153&_ft_=...", - "#!/photo/view_full_size/?fbid=1523&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=153&_ft_=..." + "https://scontent-yyz1-1.xx.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/229_546131_836546862_n.jpg?efg=e343J9&oh=d4245b1&oe=5453" +// "/photo/view_full_size/?fbid=1523&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=153&_ft_=...", +// "#!/photo/view_full_size/?fbid=1523&ref_component=mbasic_photo_permalink&ref_page=%2Fwap%2Fphoto.php&refid=153&_ft_=..." ).forEach { assertTrue(it.isImageUrl, "Failed to match image for $it") } @@ -84,4 +84,10 @@ class FbUrlTest { } + @Test + fun viewFullImage() { + val url = "https://scontent-yyz1-1.xx.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/asdf_n.jpg?efg=asdf&oh=asdf&oe=asdf" + assertFbFormat(url, "#!$url") + } + } \ No newline at end of file -- cgit v1.2.3