Skip to content

feat(Webview): automatic exit from LoginScreen after successful login#624

Merged
rukamori merged 1 commit into
ArchiveTuneApp:devfrom
sang765:feat/webview/auto-exit
May 18, 2026
Merged

feat(Webview): automatic exit from LoginScreen after successful login#624
rukamori merged 1 commit into
ArchiveTuneApp:devfrom
sang765:feat/webview/auto-exit

Conversation

@sang765

@sang765 sang765 commented May 17, 2026

Copy link
Copy Markdown
Member

This PR implements an automatic exit from the LoginScreen after a successful Google login, improving the user experience by providing immediate feedback and returning to the previous screen.

Changes:

  • String Resources: Added login_success ("Logged in successfully") to both the default and Vietnamese (vi) string resources.
  • Login Logic:
    • Introduced a hasNavigated state in LoginScreen to prevent redundant navigation or multiple toast notifications.
    • Updated the onPageFinished logic to trigger a check for account information via YouTube.accountInfo().
    • On a successful account info retrieval, a toast notification is displayed, and the navController navigates back.
  • Safety: Verified that these changes do not affect PoTokenExtractionActivity, as it uses its own WebView client logic.

Video

screen-20260518-060806.mp4

- Add 'login_success' string to archivetune_strings.xml (default and vi).
- Update LoginScreen.kt to detect successful login via YouTube.accountInfo(), show a toast, and navigate up.
- Use a flag to ensure navigation and toast only happen once.
- Ensure no impact on PoTokenExtractionActivity.

Signed-off-by: Hà Tiến Sáng <bemimnitran@gmail.com>
@rukamori rukamori merged commit 0f52be8 into ArchiveTuneApp:dev May 18, 2026
1 check passed
@sang765 sang765 deleted the feat/webview/auto-exit branch May 18, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants