aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
authorMarvin Borner2018-08-24 14:09:46 +0200
committerMarvin Borner2018-08-24 14:09:46 +0200
commite8c299348bd3d5ec7ca52cdfc9e995d5aeeab2bd (patch)
tree9c4497be46b55e23d6a9f56fb4e9f16e878eba8c /app/src
parent10b5d2691d948022e277be055e3bbe87ff33efdf (diff)
Fixed unauthorized access being recognized as serverError
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/no_name/no_name/InitialActivity.kt1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/src/main/java/com/no_name/no_name/InitialActivity.kt b/app/src/main/java/com/no_name/no_name/InitialActivity.kt
index ee25d3d..80ca5a7 100644
--- a/app/src/main/java/com/no_name/no_name/InitialActivity.kt
+++ b/app/src/main/java/com/no_name/no_name/InitialActivity.kt
@@ -43,6 +43,7 @@ class InitialActivity : AppCompatActivity() {
val (_, serverError) = result
when {
response.httpStatusCode == 200 -> startActivity<MainActivity>()
+ response.httpStatusCode == 401 -> startActivity<LoginActivity>()
!isConnected() -> startActivity<MainActivity>("notConnected" to true)
serverError != null -> startActivity<MainActivity>("serverDown" to true)
else -> startActivity<LoginActivity>()