Skip to content

Commit

Permalink
added a signed out message on the login actvity
Browse files Browse the repository at this point in the history
  • Loading branch information
SarthakSingh31 committed Jul 17, 2020
1 parent 13fecd8 commit 53093ad
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
Expand Up @@ -46,6 +46,7 @@ class CommonWebViewFragment: Fragment() {
Log.d("onPageFinished", "Logging out")
authState.deleteAuth()
val intent = Intent(activity, LoginActivity::class.java)
intent.putExtra("LOGGED_OUT", true)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK)
startActivity(intent)
activity?.finish()
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/java/edu/uw/myuw_android/LoginActivity.kt
Expand Up @@ -46,7 +46,13 @@ class LoginActivity: AppCompatActivity() {
afterLogin.visibility = ViewGroup.VISIBLE
startMainActivity()
} else {
signed_status.text = getString(R.string.not_signed_in)
if (intent.getBooleanExtra("LOGGED_OUT", false)) {
signed_status.text = getString(R.string.signed_out)
signed_desc.text = getString(R.string.signed_out_desc)
} else {
signed_status.text = getString(R.string.not_signed_in)
signed_desc.text = getString(R.string.login_info)
}
}
}

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_login.xml
Expand Up @@ -27,6 +27,7 @@
android:layout_height="15dp" />

<TextView
android:id="@+id/signed_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="5dp"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Expand Up @@ -34,4 +34,6 @@
<string name="search_hint">Tuition, Transcript</string>
<string name="error_affiliations_update">Signed Out</string>
<string name="error_affilications_update_desc">You have been signed out, likely due to an application error or prolonged inactivity.\nSign in to continue.</string>
<string name="signed_out">Signed Out</string>
<string name="signed_out_desc">You have been signed out successfully. In some cases, you may be signed out because of an application error or prolonged inactivity. Sign in to continue.</string>
</resources>

0 comments on commit 53093ad

Please sign in to comment.