also check return type when not using url callback

This commit is contained in:
greenart7c3
2023-10-27 06:49:19 -03:00
parent 1fe5603bec
commit 1c52bd97f5
2 changed files with 15 additions and 2 deletions
@@ -122,10 +122,22 @@ fun sendResult(
}
}
} else {
clipboardManager.setText(AnnotatedString(value))
val result = if (intentData.returnType == ReturnType.SIGNATURE) {
value
} else {
event
}
val message = if (intentData.returnType == ReturnType.SIGNATURE) {
context.getString(R.string.signature_copied_to_the_clipboard)
} else {
context.getString(R.string.event_copied_to_the_clipboard)
}
clipboardManager.setText(AnnotatedString(result))
Toast.makeText(
context,
context.getString(R.string.signature_copied_to_the_clipboard),
message,
Toast.LENGTH_SHORT
).show()
}
+1
View File
@@ -80,4 +80,5 @@
<string name="message_already_encrypted">Message already encrypted</string>
<string name="relay">Relay</string>
<string name="go_to_top">go to top</string>
<string name="event_copied_to_the_clipboard">Event copied to the clipboard</string>
</resources>