Commit 08ea57e7 authored by Niklas Fix's avatar Niklas Fix 🎓

minor changes

parent c376ea2d
......@@ -27,6 +27,7 @@ import de.akamu.tudarmstadt.model.User
import de.akamu.tudarmstadt.util.AkamuResource
import de.akamu.tudarmstadt.util.AppUserUtil
import de.akamu.tudarmstadt.util.Constants
import de.akamu.tudarmstadt.util.Extensions.Companion.toast
import kotlinx.android.synthetic.main.activity_main.*
import tyrantgit.explosionfield.ExplosionField
......@@ -88,8 +89,7 @@ class MainActivity : BaseActivity(), DashboardContract.View, NextLevelEventHandl
fillProfile()
setupBottomNavigation()
val pageQuantifier = intent.getIntExtra(Constants.KEY_MAINACTIVITY_PAGE, 0)
when(pageQuantifier) {
when(intent.getIntExtra(Constants.KEY_MAINACTIVITY_PAGE, 0)) {
Constants.DUEL_LIST_FRAGMENT -> navigateToDuelList()
Constants.CHALLENGE_FRAGMENT -> navigateToChallenge()
else -> navigateToDuelList()
......@@ -217,7 +217,7 @@ class MainActivity : BaseActivity(), DashboardContract.View, NextLevelEventHandl
}
override fun onLoadUserFail(reason: String) {
Toast.makeText(this, reason, Toast.LENGTH_SHORT).show()
toast(getString(R.string.load_user_failed, reason))
}
override fun onNextLevelReached() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment