feat(backup): add RESTORE_REQUEST and RESTORE_CONSENT routes + navigation

This commit is contained in:
null 2026-06-30 20:43:10 -05:00
parent df9edc1daf
commit fd854b635c
2 changed files with 20 additions and 0 deletions

View File

@ -43,6 +43,8 @@ import app.closer.ui.pairing.InviteConfirmScreen
import app.closer.ui.pairing.PairPromptScreen
import app.closer.ui.pairing.PairingSuccessScreen
import app.closer.ui.pairing.RecoveryScreen
import app.closer.ui.pairing.RestoreConsentScreen
import app.closer.ui.pairing.RestoreRequestScreen
import app.closer.ui.dates.DateMatchScreen
import app.closer.ui.dates.DateMatchesScreen
import app.closer.ui.dates.DateBuilderScreen
@ -387,9 +389,24 @@ fun AppNavigation(
navController.navigate(AppRoute.HOME) {
popUpTo(AppRoute.RECOVERY) { inclusive = true }
}
},
onPartnerRestore = { navController.navigate(AppRoute.RESTORE_REQUEST) }
)
}
// Partner-assisted restore (recipient A requests; partner B consents).
composable(route = AppRoute.RESTORE_REQUEST) {
RestoreRequestScreen(
onDone = {
navController.navigate(AppRoute.HOME) {
popUpTo(AppRoute.RESTORE_REQUEST) { inclusive = true }
}
}
)
}
composable(route = AppRoute.RESTORE_CONSENT) {
RestoreConsentScreen(onDone = { navController.popBackStack() })
}
// Wheel / Category Selection
composable(route = AppRoute.CATEGORY_PICKER) {

View File

@ -57,6 +57,9 @@ object AppRoute {
const val MEMORY_LANE_CAPSULE = "memory_lane_capsule/{capsuleId}"
const val WAITING_FOR_PARTNER = "waiting_for_partner"
const val RECOVERY = "recovery"
// Partner-assisted restore: the recovering device requests help; the partner consents + enters the code.
const val RESTORE_REQUEST = "restore_request"
const val RESTORE_CONSENT = "restore_consent"
const val YOUR_PROGRESS = "your_progress"
const val ACTIVITY = "activity"
const val ART_PREVIEW = "art_preview"