Add quick restore flow and DebugLoggableModel to regV5.

Renames restore → quickrestore package, adds QuickRestoreQrViewModel,
introduces DebugLoggableModel for safe toString in release builds,
updates all State/Events classes to extend it, switches previews to
AllDevicePreviews, and enables BuildConfig for the registration module.
This commit is contained in:
Greyson Parrelli
2026-03-12 13:42:15 -04:00
committed by Michelle Tang
parent 889ebcadd4
commit 39de824bf0
59 changed files with 800 additions and 143 deletions

View File

@@ -119,3 +119,11 @@ fun String.splitByByteLength(byteLength: Int): Pair<String, String?> {
val remainder = this.substring(firstPart.length)
return firstPart to remainder
}
/**
* Returns a new string with the same length, but all chars replaced with the [censorChar].
* e.g. "abc".censor() -> "***"
*/
fun String.censor(censorChar: Char = '*'): String {
return String(CharArray(this.length) { censorChar })
}