[TV] Confirm before logging out from the profile modal - #5796
Conversation
|
Claude finished @sztomek's task in 2m 1s —— View job Small, correct change. The state toggle is sound: Non-blocking
Nits
|
| message = stringResource(LR.string.tv_profile_log_out_confirmation_message), | ||
| confirmLabel = stringResource(LR.string.log_out), | ||
| onConfirm = onLogOut, | ||
| onCancel = { isShowingLogoutConfirmation = false }, |
There was a problem hiding this comment.
(non-blocking) Cancelling drops focus on Starred Episodes, not back on Log out. TvProfileModalContent leaves composition while the confirmation shows, so its remember { FocusRequester() } and LaunchedEffect are recreated and re-request focus on the first button — the user has to D-pad down three rows to get back to where they were.
TvEpisodeActionsModal solves exactly this with returnFocusLabel (TvEpisodeActionsModal.kt:64, :114-117, :176-183), which restores focus to the button that opened the confirmation. Worth matching here, e.g. keep the confirmation state inside TvProfileModalContent and focus the Log out button when it returns to null.
There was a problem hiding this comment.
Fixed by matching the returnFocusLabel pattern from TvEpisodeActionsModal. Moved the confirmation state into TvProfileModalContent so it no longer leaves composition (with its own BackHandler for Back-to-cancel), and on cancel it now attaches the FocusRequester to the Log out button rather than the first row — so focus returns to where the user was.
| <string name="tv_search_error_subtitle">Check your connection and try again.</string> | ||
| <string name="tv_profile_starred_episodes">Starred Episodes</string> | ||
| <string name="tv_profile_log_out_confirmation_title">Log out?</string> | ||
| <string name="tv_profile_log_out_confirmation_message">This removes all downloaded podcasts and data from this device. You can log in again to restore them.</string> |
There was a problem hiding this comment.
(nit) "You can log in again to restore them" overpromises for downloads. TvSignOutManager.deleteDownloadedFiles() deletes the episode/cloud/temp directories outright; logging back in restores subscriptions and sync state, but downloaded files have to be re-downloaded. Consider "You can log in again to sync your podcasts back." or similar.
There was a problem hiding this comment.
Fixed — reworded to "…You can log in again to sync your podcasts back." Confirmed TvSignOutManager.deleteDownloadedFiles() deletes the download directories via deleteRecursively(), so the old "restore them" wording did overpromise for downloads; sync state comes back on re-login, downloads have to be re-downloaded.
|
Claude finished @sztomek's task in 29s —— View job No new commits since my last review ( Non-blocking
Nits
|
e142cb8 to
5c360df
Compare
3623646 to
0d77740
Compare
|
Claude finished @sztomek's task in 1m 35s —— View job
|
3fac200 to
2ec5362
Compare
0d77740 to
4a8cbdf
Compare
2ec5362 to
822daef
Compare
4a8cbdf to
8861c29
Compare
|
Claude finished @sztomek's task in 1m 14s —— View job The branch was force-pushed (rebased into 3 commits; the previously reviewed |
Description
Adds a confirmation dialog before logging out from the Android TV profile modal, bringing it to parity with the Apple TV app. Previously tapping Log out signed the user out immediately, with no chance to cancel an accidental D-pad selection — a destructive action (it clears all downloaded podcasts and data from the device).
Now tapping Log out swaps the profile modal content for an in-place confirmation (
TvConfirmationContent) with a title, an explanatory message, a Log out confirm button, and a Cancel button. Focus lands on Cancel by default (the safe choice for a destructive action). Pressing Back / dismissing while the confirmation is showing returns to the profile menu rather than closing the whole modal; only confirming actually signs out.Reuses the existing shared
TvConfirmationContentcomponent (already used for other TV confirmations) and the existinglog_out/cancelstrings, so the change is a small state toggle insideTvProfileModalplus two new strings for the confirmation copy.Fixes PCDROID-740 https://linear.app/a8c/issue/PCDROID-740/logout-confirmation-dialog
Testing Instructions
Screenshots or Screencast
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xml