Fix merge re-adding deleted/cancelled events and timer sync
- Track removed events via removedSinceLoad set in Logbook to prevent merge from re-adding deliberately deleted or cancelled events - Deduplicate finalized timer events (same type + similar start time) to prevent duplicates when both devices stop the same timer - Detect timer cancellation from other device: dismiss local timer dialog when ongoing event disappears from logbook after sync - Fix thread safety: take snapshot of events before background merge Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ class Logbook(val name: String) {
|
||||
const val MAX_SAFE_LOGBOOK_SIZE = 30000
|
||||
}
|
||||
val logs = ArrayList<LunaEvent>()
|
||||
val removedSinceLoad = mutableSetOf<String>()
|
||||
|
||||
fun isTooBig(): Boolean {
|
||||
return logs.size > MAX_SAFE_LOGBOOK_SIZE
|
||||
|
||||
Reference in New Issue
Block a user