mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 03:18:23 +00:00
do not show login screen when account doesn't exists
This commit is contained in:
@@ -25,7 +25,10 @@ class AccountStateViewModel(npub: String?) : ViewModel() {
|
||||
}
|
||||
|
||||
private fun tryLoginExistingAccount(route: String?, npub: String?) {
|
||||
val currentUser = npub ?: LocalPreferences.currentAccount()
|
||||
var currentUser = npub ?: LocalPreferences.currentAccount()
|
||||
if (currentUser != null && !LocalPreferences.containsAccount(currentUser)) {
|
||||
currentUser = LocalPreferences.currentAccount()
|
||||
}
|
||||
LocalPreferences.loadFromEncryptedStorage(currentUser)?.let {
|
||||
startUI(it, route)
|
||||
}
|
||||
|
||||
@@ -89,10 +89,8 @@ fun sendResult(
|
||||
// Convert the compressed data to Base64
|
||||
val compressedData = byteArrayOutputStream.toByteArray()
|
||||
val encodedString = Base64.getEncoder().encodeToString(compressedData)
|
||||
val encodedString2 = Uri.encode(encodedString)
|
||||
|
||||
val intent = Intent(Intent.ACTION_VIEW)
|
||||
intent.data = Uri.parse(callBackUrl + encodedString2)
|
||||
intent.data = Uri.parse(callBackUrl + Uri.encode("Signer1$encodedString"))
|
||||
context.startActivity(intent)
|
||||
} else {
|
||||
clipboardManager.setText(AnnotatedString(value))
|
||||
|
||||
Reference in New Issue
Block a user