This commit is contained in:
Hunter Kehoe 2022-11-12 14:02:25 -07:00
parent 915ca3d045
commit 1173ac3a5f

View file

@ -472,9 +472,8 @@ fun ensureSafeNewFile(dir: File, name: String): File {
fun copyToClipboard(context: Context, notification: Notification) {
val message = decodeMessage(notification)
val text = message + "\n\n" + formatDateShort(notification.timestamp)
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("notification message", text)
val clip = ClipData.newPlainText("notification message", message)
clipboard.setPrimaryClip(clip)
Toast
.makeText(context, context.getString(R.string.detail_copied_to_clipboard_message), Toast.LENGTH_LONG)