mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08:23 +00:00
also check return type when not using url callback
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user