mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-01 04:12:12 +00:00
avoid adding duplicate clipboard entries
This commit is contained in:
parent
88cde3ee3a
commit
39e00276fe
1 changed files with 1 additions and 0 deletions
|
@ -60,6 +60,7 @@ class ClipboardHistoryManager(
|
|||
|
||||
val content = clipItem.coerceToText(latinIME)
|
||||
if (TextUtils.isEmpty(content)) return
|
||||
if (historyEntries.any { it.content.toString() == content.toString() }) return
|
||||
|
||||
val entry = ClipboardHistoryEntry(timeStamp, content)
|
||||
historyEntries.add(entry)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue