mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 00:17:41 +01:00
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:
committed by
Michelle Tang
parent
889ebcadd4
commit
39de824bf0
@@ -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 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user