aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-08 03:03:55 -0400
committerGitHub <noreply@github.com>2017-07-08 03:03:55 -0400
commitb10a745c7f0f46f4f014e1ba7fa71172d7442b83 (patch)
treeef2516b69fb04ec0f565c5bb569fd5d80b7bd262 /app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt
parent6adfc496374eb88919f70a240eb15a726d2c18e0 (diff)
downloadfrost-1.2.tar.gz
frost-1.2.tar.bz2
frost-1.2.zip
Dev-1.1.7 (#39) - feature overload + context menuv1.2
* Address some crashlytics issues * Add text scaling * Kau fixes and cleanup * WIP formatter * Create in house url formatter * Update context menu * Update themes * Test proguard without R * Implement sharing and clean up context menu * Disable viewpager swipe on long press * Test keeping lib strings * Update changelog and proguard
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt
index 932324f2..901ba02d 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt
@@ -14,6 +14,7 @@ import com.raizlabs.android.dbflow.structure.BaseModel
import org.jetbrains.anko.doAsync
import org.jsoup.Jsoup
import paperparcel.PaperParcel
+import java.net.UnknownHostException
/**
* Created by Allan Wang on 2017-05-30.
@@ -71,7 +72,8 @@ fun CookieModel.fetchUsername(callback: (String) -> Unit) {
.get().title()
L.d("Fetch username found", result)
} catch (e: Exception) {
- L.e(e, "Fetch username failed")
+ if (e !is UnknownHostException)
+ L.e(e, "Fetch username failed")
} finally {
if (result.isBlank() && (name?.isNotBlank() ?: false)) {
callback(name!!)