Merge pull request #44 from wunter8/471-remove-timestamp-from-message-to-clipboard

fixes binwiederhier/ntfy#471
This commit is contained in:
Philipp C. Heckel 2022-11-13 06:24:15 -05:00 committed by GitHub
commit 7fc3cbc52a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)