Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
Updater: Update login expiration status in real time
Browse files Browse the repository at this point in the history
  • Loading branch information
YuKongA committed Jan 10, 2024
1 parent 035ad6c commit b2b21c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/kotlin/top/yukonga/update/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ class MainActivity : AppCompatActivity() {
val description = cookies["description"].toString()
val authResult = cookies["authResult"].toString()
if (description.isNotEmpty() && recoveryRomInfo.authResult != 1 && authResult != "-1") {
loginIcon.setImageResource(R.drawable.ic_error)
loginTitle.text = getString(R.string.login_expired)
loginDesc.text = getString(R.string.login_expired_desc)
cookies["authResult"] = "-1"
FileUtils.saveCookiesFile(this@MainActivity, Gson().toJson(cookies))
MiuiStringToast.showStringToast(this@MainActivity, getString(R.string.login_expired_dialog), 0)
Expand Down

0 comments on commit b2b21c6

Please sign in to comment.