Even faster login!

This commit is contained in:
Caesar2011
2018-07-19 10:33:47 +02:00
parent 8fe4899571
commit d2541a1a3f
2 changed files with 5 additions and 3 deletions

View File

@@ -85,14 +85,17 @@ public class MainActivity extends AppCompatActivity
mNavigationView.setNavigationItemSelectedListener(this); mNavigationView.setNavigationItemSelectedListener(this);
fragmentManager = getSupportFragmentManager(); fragmentManager = getSupportFragmentManager();
LoginToken loginToken = getKVV().easyLogin();
if (newFragmentPage != FRAGMENT_LOGIN && newFragmentPage != FRAGMENT_STARTUP && newFragmentPage != FRAGMENT_NONE) { if (newFragmentPage != FRAGMENT_LOGIN && newFragmentPage != FRAGMENT_STARTUP && newFragmentPage != FRAGMENT_NONE) {
LoginToken loginToken = getKVV().easyLogin();
if (loginToken != null) if (loginToken != null)
toLoginState(loginToken, newFragmentPage, newFragmentData); toLoginState(loginToken, newFragmentPage, newFragmentData);
else else
checkAndDoLogin(); checkAndDoLogin();
} else { } else {
checkAndDoLogin(); if (loginToken != null)
toLoginState(loginToken, getDefaultFragmentAfterLogin(), "");
else
checkAndDoLogin();
} }
} }

View File

@@ -44,7 +44,6 @@
android:id="@+id/login_mail" android:id="@+id/login_mail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
tools:text="Android Studio" tools:text="Android Studio"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:visibility="gone" /> android:visibility="gone" />