Skip to content

Commit

Permalink
do not show login screen when account doesn't exists
Browse files Browse the repository at this point in the history
  • Loading branch information
greenart7c3 committed Oct 2, 2023
1 parent ddbdcc2 commit 480321c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 480321c

Please sign in to comment.