aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-06 17:13:04 -0400
committerGitHub <noreply@github.com>2017-07-06 17:13:04 -0400
commit2586e947f769740dd8cb8bf8b1dd0473b51e50e4 (patch)
tree3deedd5357cbf7f52a8576dd715babf7b5bd097d /app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt
parentbbe30297a216218ded4c2c6e3e8c2843652eb7a7 (diff)
downloadfrost-2586e947f769740dd8cb8bf8b1dd0473b51e50e4.tar.gz
frost-2586e947f769740dd8cb8bf8b1dd0473b51e50e4.tar.bz2
frost-2586e947f769740dd8cb8bf8b1dd0473b51e50e4.zip
Dev 1.1.4 - fixes for donations (#31)
* Remove cookie from error log * Remove null check on login as it isn't possible * Add exception to profile loading * Remap billing logic * Display snackbar only for user prompts * Private disposed caller
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt
index da70714d..9b79b996 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt
@@ -86,12 +86,13 @@ class LoginActivity : BaseActivity() {
.observeOn(AndroidSchedulers.mainThread()).subscribe {
(foundImage, name) ->
refresh = false
- if (!foundImage) L.eThrow("Could not get profile photo; Invalid userId?\n\t$cookie")
+ if (!foundImage) {
+ L.eThrow("Could not get profile photo; Invalid userId?")
+ L.i("-\t$cookie")
+ }
textview.text = String.format(getString(R.string.welcome), name)
textview.fadeIn()
- frostAnswers {
- logLogin(LoginEvent().putMethod("frost_browser").putSuccess(true))
- }
+ frostAnswers { logLogin(LoginEvent().putMethod("frost_browser").putSuccess(true)) }
/*
* The user may have logged into an account that is already in the database
* We will let the db handle duplicates and load it now after the new account has been saved
@@ -117,6 +118,7 @@ class LoginActivity : BaseActivity() {
}
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>?, isFirstResource: Boolean): Boolean {
+ if (e != null) L.e(e, "Profile loading exception")
profileObservable.onSuccess(false)
return false
}
@@ -124,8 +126,6 @@ class LoginActivity : BaseActivity() {
}
fun loadUsername(cookie: CookieModel) {
- cookie.fetchUsername {
- usernameObservable.onSuccess(it)
- }
+ cookie.fetchUsername { usernameObservable.onSuccess(it) }
}
} \ No newline at end of file