aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-01-01 18:46:16 -0500
committerAllan Wang <me@allanwang.ca>2019-01-01 18:46:16 -0500
commit7d737fcb844fbf9b0e8cbcb05fc09ef122d708a8 (patch)
treea923cd2a3b1096772b57266eccf34676fd890fc2 /app/src/main/kotlin/com/pitchedapps
parent1ab4155b8f96ad5cd055f9cd8695b1cd1ff02b6a (diff)
downloadfrost-7d737fcb844fbf9b0e8cbcb05fc09ef122d708a8.tar.gz
frost-7d737fcb844fbf9b0e8cbcb05fc09ef122d708a8.tar.bz2
frost-7d737fcb844fbf9b0e8cbcb05fc09ef122d708a8.zip
Fix login deadlock
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt
index 9540636a..b5521e3e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt
@@ -93,7 +93,7 @@ class LoginActivity : BaseActivity() {
FbCookie.save(cookie.id)
web.fadeOut(onFinish = {
profile.fadeIn()
- launch { loadInfo(cookie) }
+ this@LoginActivity.launch { loadInfo(cookie) }
})
}
}
@@ -108,9 +108,10 @@ class LoginActivity : BaseActivity() {
val imageDeferred = async { loadProfile(cookie.id) }
val nameDeferred = async { loadUsername(cookie) }
- val foundImage = imageDeferred.await()
- val name = nameDeferred.await()
+ val name: String = nameDeferred.await()
+ val foundImage: Boolean = imageDeferred.await()
+ L._d { "Logged in and received data" }
refresh(false)
if (!foundImage) {