mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Update alert UI and button changes
This commit is contained in:
parent
adc28fcf2f
commit
24009f7b81
7 changed files with 96 additions and 9 deletions
|
|
@ -160,6 +160,7 @@ class ClipboardManager: ObservableObject {
|
|||
@Published var clipboardHistory: [ClipboardItem] = []
|
||||
@Published var pinnedItems: [ClipboardItem] = []
|
||||
@Published var isMonitoring: Bool = false
|
||||
@Published private(set) var lastCopiedItemDate: Date?
|
||||
|
||||
private var timer: Timer?
|
||||
private var lastChangeCount: Int = 0
|
||||
|
|
@ -450,6 +451,7 @@ class ClipboardManager: ObservableObject {
|
|||
|
||||
// Add to beginning of array
|
||||
self.clipboardHistory.insert(item, at: 0)
|
||||
self.lastCopiedItemDate = item.timestamp
|
||||
|
||||
// Keep only the most recent items and clean up old files
|
||||
let itemsToDelete = Array(self.clipboardHistory.dropFirst(self.maxHistoryItems))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue